mip-processor
v1.2.2
Published
MIP Base Processor Class
Downloads
2,330
Readme
mip-processor
MIP Base Processor Class
usage
var MipProcessor = require('mip-processor');
var less = require('less');
var LessProcessor = MipProcessor.derive({
name: 'LessCompiler',
files: ['*.less'],
processFile: function (file) {
var paths = [];
var options = {
relativeUrls: true,
compress: true,
paths: paths,
filename: file.fullPath
};
return less.render(file.data, options).then(
function (result) {
file.outputPath = file.outputPath.replace(/\.less$/i, '.css');
file.setData(result.css);
return true;
}
);
}
});