grunt-lessless

compile LESS into CSS, change links to point to the CSS files, remove less.js from page

Usage no npm install needed!

<script type="module">
  import gruntLessless from 'https://cdn.skypack.dev/grunt-lessless';
</script>

README

grunt-lessless

Grunt plugin for lessless, a tool that compiles LESS into CSS, changes links to point to the CSS files, removes less.js from HTML page(s). Very handy when you're using less.js in the browser but want to deploy CSS.

Getting Started

Install this grunt plugin next to your project's Gruntfile with: npm install grunt-lessless

Then add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-lessless');

Documentation

Add this to your Gruntfile.js:

lessless: {
  buildDir: 'path/to/frontend-build'
}

If you're using RequireJS then buildDir should match dir from your requirejs settings. With grunt you can even point to the same variable:

lessless: {
  buildDir: '<%= requirejs.compile.options.dir %>'
}

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

0.1.0 initial release.

License

Copyright (c) 2012 Dave Geddes
Licensed under the MIT license.