Skip to content

Commit

Permalink
setup: add terser to compress bundled script
Browse files Browse the repository at this point in the history
  • Loading branch information
fbrandt-dev committed Feb 12, 2020
1 parent 38a38e1 commit 125b0d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ tags
[._]*.un~

#Bundle
bundle/sipgate-io.js
bundle/sipgate-io.js
bundle/sipgate-io.min.js
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:dev": "jest ./lib --env=node --watch",
"test:unit": "jest ./lib --env=node",
"test:integration": "npm run bundle && jest ./bundle --env=jsdom",
"bundle": "browserify -r ./lib/index.ts:sipgate-io -p tsify -g uglifyify > ./bundle/sipgate-io.js",
"bundle": "browserify -r ./lib/index.ts:sipgate-io -p tsify -g uglifyify > ./bundle/sipgate-io.js && terser --compress --mangle -o ./bundle/sipgate-io.min.js -- ./bundle/sipgate-io.js",
"prepare": "tsc"
},
"repository": {
Expand Down Expand Up @@ -88,7 +88,8 @@
"ts-jest": "^24.2.0",
"tsify": "^4.0.1",
"typescript": "^3.7.2",
"uglifyify": "^5.0.2"
"uglifyify": "^5.0.2",
"uglify-js": "^3.7.7"
},
"dependencies": {
"@types/google-libphonenumber": "^7.4.17",
Expand Down

0 comments on commit 125b0d3

Please sign in to comment.