feat: add minified version
This commit is contained in:
parent
29c26be58c
commit
5a71651abc
2 changed files with 18 additions and 3 deletions
15
package-lock.json
generated
15
package-lock.json
generated
|
@ -10,7 +10,8 @@
|
|||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@size-limit/preset-small-lib": "^11.0.0",
|
||||
"typescript": "^5.2.2"
|
||||
"typescript": "^5.2.2",
|
||||
"uglify-js": "^3.17.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
|
@ -914,6 +915,18 @@
|
|||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/uglify-js": {
|
||||
"version": "3.17.4",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
|
||||
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"uglifyjs": "bin/uglifyjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/unicorn-magic": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
"start": "npx simple-server .",
|
||||
"build": "tsc --allowJs src/* --outDir dist --declaration --emitDeclarationOnly",
|
||||
"clean": "rm -rf dist",
|
||||
"minify": "npx uglifyjs ./dist/WebComponent.js -o ./dist/WebComponent.min.js",
|
||||
"copy:meta": "cp package.json ./dist && cp README.md ./dist && cp LICENSE ./dist",
|
||||
"copy:source": "cp ./src/* ./dist",
|
||||
"publish": "npm run clean && npm run build && npm run copy:meta && npm run copy:source && cd ./dist && npm publish --access public",
|
||||
"publish": "npm run clean && npm run build && npm run copy:meta && npm run copy:source && npm run minify && cd ./dist && npm publish --access public",
|
||||
"publish:patch": "npm version patch && npm run publish",
|
||||
"publish:minor": "npm version minor && npm run publish",
|
||||
"check:size": "npm run build && size-limit ./dist"
|
||||
|
@ -32,6 +33,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@size-limit/preset-small-lib": "^11.0.0",
|
||||
"typescript": "^5.2.2"
|
||||
"typescript": "^5.2.2",
|
||||
"uglify-js": "^3.17.4"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue