Skip to content

Commit 5d7df21

Browse files
committed
Run ncc via npm run build-dist
This adds a convenience `script` entry to the `package.json` file that allows bundling everything into `dist/`, dependency-free. Since `ncc` generates a lot of `.d.ts` files (which are not required to run the GitHub Action), we go ahead and tell Git to ignore these. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1b8d5fd commit 5d7df21

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.env
33
/.test-dir/
44
/build/
5+
/dist/**/*.d.ts
56
/node_modules/
67
/npm-debug.log
78
/junit.xml

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
"type": "module",
1313
"scripts": {
1414
"build": "tsc",
15+
"build-dist": "ncc build -s -m ./lib/ci-helper.ts -o dist",
1516
"cleanbranch": "node ./build/script/delete-test-branches.js",
16-
"lint": "eslint \"{lib,script,tests,tests-config}/**/*.{ts,tsx,mjs,js}\"",
17+
"lint": "eslint \"{lib,script,tests,tests-config}/**/*.{ts,tsx,mjs,js}\" --ignore-pattern \"dist/**/*\"",
1718
"start": "node server.js",
1819
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --env=node",
1920
"test:clean": "jest --clearCache && npm test",

0 commit comments

Comments
 (0)