Skip to content

Instantly share code, notes, and snippets.

@phproberto
Last active December 25, 2015 06:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phproberto/6933178 to your computer and use it in GitHub Desktop.
Save phproberto/6933178 to your computer and use it in GitHub Desktop.
Ubuntu: JS minify compatible for bootstrap files using + Joomla bootstrap minify example

This uses UglifyJS to create minified files.

Install node:

# python-software-properties is needed to use add-apt-repository
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Install uglifyjs

Bootstrap requires a specific uglifyjs version that works with bootstrap:

sudo npm install uglify-js@1 -g

Sample minify command

To minify bootstrap Joomla files:

uglifyjs -nc media/jui/js/bootstrap.js > media/jui/js/bootstrap.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment