You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Uglify Javascript using UglifyJS 3 documentation here
UglifyJS 3 as a CLI is installed using
sudo npm install uglify-js -g
Follow these steps to compress Javascript files into all.min.js
mkdir javascript
`mv app/assets/*.js javascript'
--keep-fnames
leaves function names unchanged,-c
compresses file,-o
specifies output optionsuglifyjs javascript/*.js --keep-fnames -c -o app/assets/all.min.js
Minify CSS using uglifycss documentation here
uglifycss as a CLI is installed using
sudo npm install uglifycss -g
Follow these steps to compress CSS files into all.min.css
mkdir css
mv app/assets/*.css css
uglifycss css/*.css > app/assets/all.min.css
Automation of this process for deployment could easily be automated in the future
Beta Was this translation helpful? Give feedback.
All reactions