Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mipengine/mip-processor

MIP Base Processor Class
https://github.com/mipengine/mip-processor

Last synced: about 1 month ago
JSON representation

MIP Base Processor Class

Awesome Lists containing this project

README

        

mip-processor
===========

MIP Base Processor Class

Build Status

### usage

```js
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;
}
);
}
});
```