engine-less

0.3.0 • Public • Published

engine-less NPM version

Consolidate-style engine for rendering .less files.

Install with npm

$ npm i engine-less --save

Related

  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more | homepage
  • consolidate: Template engine consolidation library | homepage
  • engine-cache: express.js inspired template-engine manager. | homepage
  • engines: Template engine library with fast, synchronous rendering, based on consolidate. | homepage
  • template: Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… more | homepage
  • verb: Documentation generator for GitHub projects. Extremely powerful, easy to use, can generate anything from API… more | homepage

API

.render

Less string support. Process the given str of less and invoke the callback callback(err, css).

Params

  • str {String}
  • options {Object|Function}: or callback.
  • callback {Function}

Example

var str = '@red: #900;\n.foo {color: @red;}';
engine.render(str, function (err, css) {
  console.log(css);
  //=> '.foo {\n  color: #990000;\n}\n'
});

.renderFile

Less file support. Process a .less file at the given fp and callback callback(err, css).

Params

  • filepath {String}
  • options {Object|Function}: or callback function.
  • callback {Function}

Example

var less = require('engine-less');
less.renderFile('my-styles.less', {}, function (err, css) {
  console.log(css);
  //=> '.aaa {\n  color: blue;\n}\n'
});

Author

Jon Schlinkert

License

Copyright © 2014-2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 24, 2015.

Package Sidebar

Install

npm i engine-less

Weekly Downloads

19

Version

0.3.0

License

MIT

Last publish

Collaborators

  • jonschlinkert