Skip to content

Commit

Permalink
chore(cli): fix pnpm fail to create bin on install (#106)
Browse files Browse the repository at this point in the history
Co-authored-by: Q.B <Zhengqbbb@users.noreply.github.com>
Co-authored-by: jrson83 < jrson83@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 17, 2023
1 parent 74eae1c commit 3b5ecb3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ docs/.vitepress/cache

# Bundle
lib/
bin/

# Typescript build file
*.tsbuildinfo
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
'use strict'
import('../lib/index.js')
5 changes: 3 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
"git-czg": "bin/index.js"
},
"files": [
"bin"
"bin",
"lib"
],
"scripts": {
"build": "pnpm clean && tsup",
"clean": "rimraf '*.tsbuildinfo' lib dist bin",
"clean": "rimraf '*.tsbuildinfo' lib",
"release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { czg, generateHelp, setupAIConfig } from './generator'
import { resovleArgs } from './shared'

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./bin",
"outDir": "./lib",
"noUnusedLocals": false,
"noUnusedParameters": false,
"removeComments": true,
},
"exclude": ["node_modules", "./dist", "./lib"],
"exclude": ["node_modules", "./bin", "./lib"],
"include": ["./src"]
}
2 changes: 1 addition & 1 deletion packages/cli/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from 'tsup'
export default defineConfig({
minify: true,
entry: ['./src/index.ts'],
outDir: './bin',
outDir: './lib',
tsconfig: './tsconfig.json',
dts: false,
sourcemap: false,
Expand Down

0 comments on commit 3b5ecb3

Please sign in to comment.