0.0.2 • Published 10 years ago

grunt-less-to-js v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

LESS to JS

Turn less files into browser and node.js compatable js.

How it Works

app.js

require('./hello.less.js');

hello.less

.hello{
  .world {
    color: lighten(red, 20%);
  }
}

Then compile the less to js

$ grunt less_to_js

which then creates hello.less.js

if(typeof document!=='undefined')require('insert-css')(".hello .world{color:#f66}")

Installation

$ npm install grunt-less-to-js --save-dev
$ npm install insert-css --save

Gruntfile.js

module.exports = function(grunt){
    grunt.initConfig({
        less_to_js: {
            files: ['src/**/*.less', 'src/**/*.css']
        }
    });
    
    grunt.loadNpmTasks('grunt-less-to-js');
};

License

MIT

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago