npm publish

This commit is contained in:
2024-11-09 02:38:24 -05:00
parent f08d37f23d
commit 9d89825d91
9 changed files with 90 additions and 26 deletions
-3
View File
@@ -1,3 +0,0 @@
@echo off
node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
-8
View File
@@ -1,8 +0,0 @@
#!/usr/bin/env bun
// #!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning
// eslint-disable-next-line n/shebang
import {execute} from '@oclif/core'
await execute({development: true, dir: import.meta.url})
View File
BIN
View File
Binary file not shown.
+32 -15
View File
@@ -1,18 +1,26 @@
{ {
"name": "jj-command-line", "name": "jj-command-line",
"description": "jj cli", "description": "jj cli",
"version": "0.0.2", "version": "0.0.5",
"author": "Jason Jafari", "author": "Jason Jafari",
"bin": { "bin": {
"jj": "./bin/run.js" "jj": "./bin/run.ts"
}, },
"bugs": "https://github.com/https://github.com/jafarijason/jj/jj/issues", "bugs": "https://github.com/https://github.com/jafarijason/jj/jj/issues",
"dependencies": { "dependencies": {
"@oclif/core": "^4", "@oclif/core": "^4",
"@oclif/plugin-autocomplete": "^3.2.8", "@oclif/plugin-autocomplete": "^3.2.8",
"@oclif/plugin-help": "^6", "@oclif/plugin-commands": "^4.1.7",
"@oclif/plugin-help": "^6.2.16",
"@oclif/plugin-not-found": "^3.2.25", "@oclif/plugin-not-found": "^3.2.25",
"@oclif/plugin-plugins": "^5" "@oclif/plugin-plugins": "^5.4.15",
"@oclif/plugin-search": "^1.2.14",
"@oclif/plugin-update": "^4.6.10",
"@oclif/plugin-version": "^2.2.15",
"@oclif/plugin-warn-if-update-available": "^3.1.21",
"@oclif/plugin-which": "^3.2.17",
"fs-extra": "^11.2.0",
"lodash": "^4.17.21"
}, },
"devDependencies": { "devDependencies": {
"@oclif/prettier-config": "^0.2.1", "@oclif/prettier-config": "^0.2.1",
@@ -44,30 +52,39 @@
"oclif" "oclif"
], ],
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "src/index.ts",
"type": "module", "type": "module",
"oclif": { "oclif": {
"bin": "jj", "bin": "jj",
"dirname": "jj", "dirname": "jj",
"commands": "./dist/commands", "commands": "./src/commands",
"plugins": [ "plugins": [
"@oclif/plugin-*",
"@oclif/plugin-help", "@oclif/plugin-help",
"@oclif/plugin-plugins" "@oclif/plugin-plugins",
"@oclif/plugin-update",
"@oclif/plugin-warn-if-update-available",
"@oclif/plugin-which",
"@oclif/plugin-commands",
"@oclif/plugin-autocomplete",
"@oclif/plugin-search",
"@oclif/plugin-version"
], ],
"topicSeparator": " ", "topicSeparator": " ",
"topics": {} "topics": {},
"theme": "theme.json",
"hooks": {
"prerun": [
"./src/hooks/postrun/customPostRun.ts"
],
"postrun": "./src/hooks/prerun/customPreRun.ts"
}
}, },
"repository": "https://github.com/jafarijason/jj/jj", "repository": "https://github.com/jafarijason/jj/jj",
"scripts": { "scripts": {
"build": "shx rm -rf dist && tsc -b", "build": " ",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "oclif manifest && oclif readme",
"test": "mocha --forbid-only \"test/**/*.test.ts\"", "test": "mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif readme && git add README.md", "pre-publish": "git add . && git push --follow-tags"
"pre-publish": "yarn build && yarn prepack && yarn prepack && git add . && yarn version && git push --follow-tags"
}, },
"types": "dist/index.d.ts" "types": "dist/index.d.ts"
} }
+15
View File
@@ -0,0 +1,15 @@
import { Hook } from '@oclif/core'
const hook: Hook<'postrun'> = async function (opts: any) {
// srmVersion
// console.log(opts.Command.flags)
// console.log(opts.Command.args)
// console.log(opts.Command.name)
// console.log(opts)
// process.stdout.write(`example hook running ${opts?.id}\n`)
}
export default hook
+15
View File
@@ -0,0 +1,15 @@
import { Hook, Command } from '@oclif/core'
import fs from 'fs-extra';
import _ from 'lodash';
const hook: Hook<'prerun'> = async function (opts) {
// srmVersion
// console.log(opts.Command.flags)
// console.log(opts.Command.args)
// console.log(opts.Command.name)
}
export default hook
Regular → Executable
+2
View File
@@ -1 +1,3 @@
#!/usr/bin/env bun
export {run} from '@oclif/core' export {run} from '@oclif/core'
+26
View File
@@ -0,0 +1,26 @@
{
"bin": "white",
"command": "cyan",
"commandSummary": "white",
"dollarSign": "white",
"flag": "white",
"flagDefaultValue": "blue",
"flagOptions": "white",
"flagRequired": "red",
"flagSeparator": "white",
"json": {
"brace": "magenta",
"bracket": "magenta",
"colon": "dim",
"comma": "dim",
"key": "yellow",
"string": "green",
"number": "green",
"boolean": "green",
"null": "red"
},
"sectionDescription": "white",
"sectionHeader": "underline",
"topic": "white",
"version": "white"
}