chore: update build process in package.json to use ncc for bundling and remove dependency copying step

This commit is contained in:
Luke Hagar
2025-08-14 22:50:41 -05:00
parent 703ab46991
commit d4b191046b

View File

@@ -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"
}, },