What is an easy-to-use free JavaScript minifier running in Ubuntu?
It should be easy to install as well. ;-)
I'm using the YUI Compressor
Check JSMin:
https://bitbucket.org/dcs/jsmin/
Install it with:
sudo apt-get install python-pip
sudo pip install jsmin
Usage as CLI:
python -m jsmin myfile.js
For example:
python -m jsmin large1.css large2.css > minified.css
As library:
from jsmin import jsmin
with open('myfile.js') as js_file:
minified = jsmin(js_file.read())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With