Skip to content

Commit 33fe906

Browse files
committed
chore: improve package scripts
Replaces `npm run` with `run-s` of `npm-run-all2` to make it package-manager-agnostic. Hoists `npm-run-all2` from the `example` folder to the root. The `build` script removes the `dist` folder before building the package.
1 parent 7019e27 commit 33fe906

File tree

4 files changed

+235
-5
lines changed

4 files changed

+235
-5
lines changed

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@vitejs/plugin-vue": "^5.2.4",
2121
"@vue/tsconfig": "^0.7.0",
2222
"geojson": "^0.5.0",
23-
"npm-run-all2": "^8.0.4",
23+
"npm-run-all2": "catalog:",
2424
"typescript": "catalog:",
2525
"vite": "^6.3.5",
2626
"vue-tsc": "^2.2.10"

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"README_ja.md"
1616
],
1717
"scripts": {
18-
"build": "rollup -c && api-extractor run --local",
19-
"build:doc": "npm run build && api-documenter markdown --input-folder temp --output-folder api-docs/markdown",
18+
"build": "rimraf dist && rollup -c && api-extractor run --local",
19+
"build:doc": "run-s build && api-documenter markdown --input-folder temp --output-folder api-docs/markdown",
2020
"type-check": "tsc --noEmit",
21-
"prepare": "npm run build",
21+
"prepare": "run-s build",
2222
"test": "echo \"Error: no test specified\" && exit 1"
2323
},
2424
"keywords": [
@@ -33,6 +33,8 @@
3333
"@rollup/plugin-typescript": "^12.1.2",
3434
"gl-matrix": "^3.4.3",
3535
"mapbox-gl": "catalog:",
36+
"npm-run-all2": "catalog:",
37+
"rimraf": "^6.0.1",
3638
"rollup": "^4.43.0",
3739
"tslib": "^2.8.1",
3840
"typescript": "catalog:"

0 commit comments

Comments
 (0)