Skip to content

alexkwolfe/node-less-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Watches a directory of LESS files for changes, and compiles to CSS when a change is made.

Usage

var lessCompiler = require('less-compiler');
var lessPath = '/path/to/less/files';
var cssPath = '/path/to/css/files';

// set up the compiler
var compiler = lessCompiler({
  src: path.join(lessPath, 'style.less'), // the less file with all your imports
  dest: cssPath                           // the directory where all your compiled CSS files go
});
compiler.on('compile', function() {
  console.log("recompiled LESS assets");
});
compiler.on('error', function(err) {
  console.log("could not compile LESS assets: " + err);
});

// watch the parent directory of the src file
compiler.watch(); 

About

Node.js module that watches a directory of LESS files for changes, and compiles to CSS when a change is made.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published