Skip to content

Commit

Permalink
Use uglifyjs instead of minify
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinaleonr committed Aug 21, 2024
1 parent e0168b2 commit 325fa0c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
name: Node.js Package

on:
release:
types: [created]
- push

jobs:
publish-npm:
Expand All @@ -16,7 +15,7 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm i minify
- run: npm i uglify-js
- run: npm ci
- run: npm publish
env:
Expand Down
19 changes: 17 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"name": "@m-lab/packet-test",
"version": "0.0.10",
"version": "0.0.11",
"description": "",
"main": "src/pt.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "minify src/pt.js | sed -e 's/load-worker.js/load-worker.min.js/g' > src/pt.min.js && minify src/pt-download-worker.js > src/pt-download-worker.min.js"
"postinstall": "uglifyjs src/pt.js | sed -e 's/load-worker.js/load-worker.min.js/g' > src/pt.min.js && uglifyjs src/pt-download-worker.js > src/pt-download-worker.min.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"eslint": "9.8.0"
},
"dependencies": {
"uglify-js": "^3.19.2"
}
}

0 comments on commit 325fa0c

Please sign in to comment.