-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: ⚡ update commander action handler
- Loading branch information
Showing
9 changed files
with
120 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# @eo-cli-pro/commandsw | ||
|
||
🚀 The package offer commandsw for @eo-cli-pro! | ||
|
||
## Build | ||
|
||
Use tsup to build and this package don't have `devDependencies`. See [ts-up#excluding-packages](https://tsup.egoist.dev/#excluding-packages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { defineConfig } from 'tsup' | ||
import type { Options } from 'tsup' | ||
|
||
export default defineConfig((options: Options) => ({ | ||
entry: ['./src/index.ts'], | ||
format: ['cjs', 'esm'], | ||
tsconfig: '../../tsconfig.node.json', | ||
dts: { | ||
compilerOptions: { | ||
// use tsconfig references generate .d.ts has error. see https://github.com/egoist/tsup/issues/647 | ||
composite: false, | ||
}, | ||
}, | ||
// platform: 'node', | ||
// shims: true, | ||
banner: { | ||
// esbuild build commonjs package error. see https://github.com/evanw/esbuild/issues/1921 | ||
// node description: https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#no-require-exports-or-moduleexports | ||
js: "import { createRequire } from 'node:module';const require = createRequire(import.meta.url);", | ||
}, | ||
minify: !options.watch, | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "@eo-cli-pro/commands", | ||
"version": "0.0.0", | ||
"description": "🚀 The package offer commands for @eo-cli-pro!", | ||
"type": "module", | ||
"keywords": [ | ||
"cli", | ||
"monorepo", | ||
"pnpm", | ||
"turborepo", | ||
"changesets" | ||
], | ||
"homepage": "https://github.com/eopol/eo-cli-pro/blob/master/packages/cli#readme", | ||
"bugs": { | ||
"url": "https://github.com/eopol/eo-cli-pro/issues" | ||
}, | ||
"license": "MIT", | ||
"author": "i7eo <admin@i7eo.com> (https://github.com/i7eo)", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"exports": { | ||
".": { | ||
"dev": "./src/index.ts", | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
}, | ||
"./*": "./*" | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"sideEffects": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/eopol/eo-cli-pro.git", | ||
"directory": "packages/cli" | ||
}, | ||
"scripts": { | ||
"build": "rimraf dist && tsup --config ./build.config.ts", | ||
"lint": "run-s lint:**", | ||
"lint:eslint": "TIMING=1 eslint \"*.{js,jsx,ts,tsx,md,json}\" --fix", | ||
"lint:prettier": "prettier --write \"*.{js,ts,jsx,tsx,md,json}\"", | ||
"clean": "run-p clean:**", | ||
"clean:cache": "rimraf .turbo && rimraf dist", | ||
"clean:deps": "rimraf node_modules" | ||
}, | ||
"dependencies": { | ||
"commander": "10.0.0" | ||
}, | ||
"devDependencies": { | ||
"tsup": "^6.5.0", | ||
"typescript": "^4.9.4" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './init' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export function commandInitActionHandler( | ||
projectName: string, | ||
options: Record<string, any> | ||
) { | ||
console.log(`command init name: ${projectName}, arg: ${options.force}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.