Skip to content

Commit c88e7ae

Browse files
committed
refactor: simplify bin wrapper and move to targetDefaults
1 parent aa69f37 commit c88e7ae

File tree

8 files changed

+8
-16
lines changed

8 files changed

+8
-16
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default tseslint.config(
166166
},
167167
{
168168
// in bin files, imports with side effects are allowed
169-
files: ['**/bin/**/*.ts', '**/bin/**/*.js'],
169+
files: ['**/bin/**/*.ts', '**/bin/**/*.js', '**/bin.js'],
170170
rules: {
171171
'import/no-unassigned-import': 'off',
172172
},

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"outputPath": "{projectRoot}/dist",
7676
"main": "{projectRoot}/src/index.ts",
7777
"tsConfig": "{projectRoot}/tsconfig.lib.json",
78-
"assets": ["{projectRoot}/*.md"]
78+
"assets": ["{projectRoot}/*.md", "{projectRoot}/bin.js"]
7979
}
8080
},
8181
"unit-test": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
* By tracking this file in git with executable permissions (+x), we ensure
99
* the CLI remains executable after npm publish without needing post-install scripts.
1010
*/
11-
import '../src/index.js';
11+
import './src/index.js';

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"type": "module",
4141
"bin": {
42-
"code-pushup": "./bin/index.js"
42+
"code-pushup": "./bin.js"
4343
},
4444
"engines": {
4545
"node": ">=20"

packages/cli/project.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
"sourceRoot": "packages/cli/src",
55
"projectType": "library",
66
"targets": {
7-
"build": {
8-
"options": {
9-
"assets": ["{projectRoot}/*.md", "{projectRoot}/bin/*"]
10-
}
11-
},
7+
"build": {},
128
"lint": {},
139
"unit-test": {},
1410
"int-test": {},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
* By tracking this file in git with executable permissions (+x), we ensure
99
* the CLI remains executable after npm publish without needing post-install scripts.
1010
*/
11-
import '../src/index.js';
11+
import './src/index.js';

packages/create-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@code-pushup/create-cli",
33
"version": "0.119.0",
44
"license": "MIT",
5-
"bin": "./bin/index.js",
5+
"bin": "./bin.js",
66
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/create-cli#readme",
77
"bugs": {
88
"url": "https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3A\"🧩%20create-cli\""

packages/create-cli/project.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
"sourceRoot": "packages/create-cli/src",
55
"projectType": "library",
66
"targets": {
7-
"build": {
8-
"options": {
9-
"assets": ["{projectRoot}/*.md", "{projectRoot}/bin/*"]
10-
}
11-
},
7+
"build": {},
128
"lint": {},
139

1410
"unit-test": {},

0 commit comments

Comments
 (0)