EN
LESS / CSS - minify css file
8
points
In this short article, we want to show how to compress *.css
files with lessc
command.
Quick solution:
lessc input_file.css --clean-css="--s1 --advanced" > output_file.min.css
Note: read the below description to know how to install
lessc
command.
Screenshot:
lessc
installation instruction
To install lessc
it is necessary to do few steps:
- be sure that NodeJS is installed (installation instruction for Windows is available here),
- install
less
using:npm install -g less
- install
lessc
using:npm install -g less-plugin-clean-css
+ less-plugin-clean-css@1.5.1 added 6 packages from 39 contributors in 1.858s
- now we can use
lessc
command (go back to Quick solution).