1. using git, clone the following repository in your sublime packages directory.
Note: the packages directory may differ depending upon your OS and sublime text installation. this one worked for me on ubuntu 16.04. Please refer this if this one didn’t work.
aman@vostro:~$ sudo apt-get install git
aman@vostro:~$ cd ~/.config/sublime-text-3/Packages
aman@vostro:~/.config/sublime-text-3/Packages$ git clone git://github.com/bistory/Sublime-Minifier.git
Cloning into 'Sublime-Minifier'...
2. Now, that its installed, usage is quite simple with some keyboard shortcuts.
ctr + alt + m – minify js/css code in the current buffer.
ctrl + alt + shift + m – minify js/css code in the current buffer and save it in another file.
⌘ + alt + m – minify js/css code in the current buffer.
⌘ + alt + shift + m – minify js/css code in the current buffer and save it in another file.