feat: bundled build

This commit is contained in:
Shibo Lyu 2025-01-04 01:45:28 +08:00
parent 899c3b8497
commit 5bdac79254
2 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules
index.js
index.bundled.js*

View file

@ -4,8 +4,10 @@
"description": "S3 Storage adapter for Ghost.",
"main": "index.js",
"scripts": {
"build": "esbuild ./src/index.js --bundle --outfile=index.js --platform=node --format=cjs --target=node16 --packages=external --footer:js='module.exports = module.exports.default;'",
"prepublishOnly": "npm run build",
"build:traditional": "esbuild ./src/index.js --bundle --outfile=index.js --platform=node --format=cjs --target=node16 --packages=external --footer:js='module.exports = module.exports.default;'",
"build:bundled": "esbuild ./src/index.js --bundle --minify --outfile=index.bundled.js --platform=node --format=cjs --target=node16 --packages=bundle --legal-comments=external --footer:js='module.exports = module.exports.default;'",
"build": "pnpm build:traditional && pnpm build:bundled",
"prepublishOnly": "pnpm build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Shibo Lyu <github@of.sb>",