以前用的压缩一般是yui compressor。

重新找了一款uglify-js

https://www.npmjs.com/package/uglify-js

 

安装:

Install
First make sure you have installed the latest version of node.js (You may need to restart your computer after this step).

From NPM for use as a command line app:

npm install uglify-js -g   这种可以在命令行使用
From NPM for programmatic use:

npm install uglify-js

 

打开终端,就可以操作了。

uglifyjs  source.js -o target.js

这样就可以手动的给一个js压缩了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-11-05
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2021-05-03
  • 2021-05-25
  • 2021-05-31
  • 2022-12-23
  • 2022-02-02
  • 2021-07-17
  • 2022-12-23
相关资源
相似解决方案