load-less-helpers
register helper functions that can be used with LESS, the same way that handlebars helpers are used in templates.
Install
Install with npm:
$ npm install --save load-less-helpers
Usage
var less = ;var register = less;
Registering helpers
Register a single helper
Example assets
helper, that might be used for dynamically calculating the path to a project's assets
directory, relative to the css
file's destination.
register;
Register multiple helpers
register;
Using helpers
Example of how to use the assets
helper we just created above:
@theme: "blah";@assets: assets"@{theme}"; .image background: url("@{assets}/bar.png");
Results in:
Properties
The following properties are exposed on the this
object:
options
: Any options passed torender
are exposed on this objectless
: theless
object
Example
register;
About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running tests
Install dev dependencies:
$ npm install && npm test
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. MIT
This file was generated by verb-generate-readme, v0.4.2, on January 29, 2017.