mirror of
https://github.com/LukeHagar/usage-statistics.git
synced 2025-12-06 04:21:55 +00:00
chore: update build process in package.json to use ncc for bundling and remove dependency copying step
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun --watch --env-file=.dev.env --env-file=.env run src/action.ts",
|
"dev": "bun --watch --env-file=.dev.env --env-file=.env run src/action.ts",
|
||||||
"build": "tsc -p tsconfig.build.json && npm run copy-deps",
|
"build": "tsc -p tsconfig.build.json && npm run bundle",
|
||||||
"copy-deps": "mkdir -p dist/node_modules && cp -r node_modules/@actions dist/node_modules/ && cp -r node_modules/@octokit dist/node_modules/ && cp -r node_modules/chart.js dist/node_modules/ && cp -r node_modules/chartjs-adapter-moment dist/node_modules/ && cp -r node_modules/fast-xml-parser dist/node_modules/ && cp -r node_modules/moment dist/node_modules/ && cp -r node_modules/semver dist/node_modules/ && cp -r node_modules/skia-canvas dist/node_modules/",
|
"bundle": "ncc build dist/action.js -o dist",
|
||||||
"test": "bun test",
|
"test": "bun test",
|
||||||
"test:action": "bun --env-file=.dev.env run dist/action.js",
|
"test:action": "bun --env-file=.dev.env run dist/action.js",
|
||||||
"clean": "rm -rf dist/",
|
"clean": "rm -rf dist/",
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
"@types/node": "^20.0.0",
|
"@types/node": "^20.0.0",
|
||||||
"@types/semver": "7.7.0",
|
"@types/semver": "7.7.0",
|
||||||
|
"@vercel/ncc": "^0.38.0",
|
||||||
"bun-types": "1.2.19",
|
"bun-types": "1.2.19",
|
||||||
"typescript": "^5.0.0"
|
"typescript": "^5.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user