node-constsass
is a Node.js application used for automated sass compilation.
npm -g install node-constsass
constsass <input directory> <output directory>
var constass = require('constsass');
function onUpdate(fileName) {
console.log('some update made for file ' + fileName);
}
constass.watchDir('web/scss/', '/compiled/css/', 'nested', onUpdate);
disable timer and add a 'oncomplete' event:
var constass = require('../lib/constsass');
//this function will be called only when files are changed
function onUpdate(fileName) {
console.log('some update made for file ' + fileName);
}
//this function will be called on check complete if timer is disabled
constass.event.onComplete = function(dir) {
console.log('done for', dir);
}
constass.enableTimer(false);
constass.watchDir('web/scss/', '/compiled/css/', 'nested', onUpdate);
Copyright (C) 2014 Alexandru Stefan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.