Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/cli/bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

/**
* This file serves as the CLI entry point.
*
* We use a separate bin file (instead of pointing directly to src/index.js)
* because TypeScript build processes don't preserve file permissions.
* By tracking this file in git with executable permissions (+x), we ensure
* the CLI remains executable after npm publish without needing post-install scripts.
*/
import '../src/index.js';
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"type": "module",
"bin": {
"code-pushup": "./src/index.js"
"code-pushup": "./bin/index.js"
},
"engines": {
"node": ">=20"
Expand Down
6 changes: 5 additions & 1 deletion packages/cli/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"sourceRoot": "packages/cli/src",
"projectType": "library",
"targets": {
"build": {},
"build": {
"options": {
"assets": ["{projectRoot}/*.md", "{projectRoot}/bin/*"]
}
},
"lint": {},
"unit-test": {},
"int-test": {},
Expand Down