hunostor

uglifyjs setup

Feb 7th, 2023
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. npm-only way:
  2.  
  3. run:
  4.  
  5. npm install uglifyjs-folder --save-dev
  6. and afterwards add to your package.json something like:
  7.  
  8. "uglifyjs": "uglifyjs-folder js -eo jsm"
  9. then run:
  10.  
  11. npm run uglifyjs
  12. Please note, if you'd need to generate to the same folder as the source files are (js), following should do the job:
  13.  
  14. run:
  15.  
  16. npm install del-cli uglifyjs-folder --save-dev
  17. and afterwards add to your package.json something like:
  18.  
  19. "uglifyjs": "del js/*.min.js; uglifyjs-folder js -eo js"
  20. then run:
  21.  
  22. npm run uglifyjs
Advertisement
Add Comment
Please, Sign In to add comment