2.0.1 • Published 7 years ago

kaba-shelf-less v2.0.1

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
7 years ago

kaba-shelf-less

A kaba shelf implementation of the less compiler.

Installation

Just install via npm / yarn:

yarn add kaba-less

Usage

In your kabafile.js use it like any other shelf task:

const kaba = require("kaba");
const lessShelf = require("kaba-shelf-less");

const less = lessShelf({
    /* config here */
})

kaba.task("less", less);

Configuration

Only files at the root of the directory are compiled.

All configuration options:

OptionTypeDescriptionDefault valueComment
inputstringA glob that matches all directories that contain LESS files"src/**/Resources/assets/less/"As this parameter is passed unaltered to glob it will accept everything that glob accepts.
outputstringThe output dir for compiled files"../../public/css"This path is relative to the (resolved) input path for the given file.
browsersarrayThe list of supported browers["last 2 versions", "IE 10"]This value is passed to autoprefixer, so please look in their documentation for all allowed values.
outputFileNamefunction(string, string) : stringOptional transform function to generate the output file name. Receives the output and input filenames as parameters.The first argument is the auto-generated file name.
debugbooleanFlag, whether a debug build should be generated.if --debug is set true, false otherwise
watchbooleanFlag, whether a watcher should be started.if --debug is set true, false otherwise