I have a question about how to install Uglify or Uglify2 on Debian. I'm alsowondering whether I have to install Node.js as well.My main goal of asking this question is to minify all my CSS and .js files and gzip/compress them so that the page load on my website gets faster for visitors.I was looking over the net for a step by step tutorial on how to do that, but got nothing handy so far.Does any one know how to do that?
How to install Uglify on Debian Sid
debian;compression;javascript
You install uglify-js with npm which comes from Node.jsInstall the npm package (which depends on nodejs)apt-get install npmInstall uglifyjsnpm install --global uglifyjsNow you have uglify-js$ uglifyjs --versionuglify-js 2.4.13Alternatively you can download the Node.js linux binaries from the download page. wget https://nodejs.org/dist/v4.4.5/node-v4.4.5-linux-x64.tar.gzThen extract Node to somewhere of your choosingtar -C /opt -xvzf node-v4.4.5-linux-x64.tar.gzexport PATH=$PATH:/opt/node-v4.4.5-linux-x86/binOr install Node system-widetar -C /usr/local --strip-components 1 -xvzf node-v4.4.5-linux-x64.tar.gz