Package Exports
- broccoli-less-single
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (broccoli-less-single) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
broccoli-less-single
The broccoli-less-single plugin compiles .less files with
less.js.
This plugin is designed to compile a single, primary input file
into a single output file, with a tree of @importd dependencies. This
differs from broccoli-less,
which compiles each .less file individually into a .css file and doesn't
support @imports or a single output file depending on multiple inputs.
This code is based heavily on broccoli-sass
Installation
npm install --save-dev broccoli-less-singleUsage
var compileLess = require('broccoli-less-single');
var outputTree = compileLess(inputTrees, inputFile, outputFile, options)inputTrees: An array of trees that act as the include paths for less. If you have a single tree, pass[tree].inputFile: Relative path of the main.lessfile to compile. This file must exist in one of theinputTrees.outputFile: Relative path of the output CSS file.options: A hash of options for less.
Example
var appCss = compileLess(sourceTrees, 'myapp/app.less', 'assets/app.css')@import-Example
/* file: sub.less */
h1 {
font-size: 200em;
}
/* =================== */
/* file: app.less */
@import "sub.less";
html, body {
margin: 20px;
}