Quantcast
Channel: Tehuelín
Viewing all articles
Browse latest Browse all 16

Quick Tip: autocompile less file on every change

$
0
0

This is something I recently did and think is worth sharing. You will need only 2 nodejs packages, and some command line twerking.

First install the official LESS compiler
npm -g install less

Then install file system monitor, this will detect every file change
npm install -g fsmonitor

Using the npm documentation example, I monitor a specific less folder for changes in any .less file, and then call the less compiler to make a new css file, and save it in the corresponding css dir. All the magic happens with this command:
fsmonitor -s -p -d 'less/' '+*.less' lessc less/main_less_file.less css/style.css


Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles





Latest Images