https://github.com/becklyn/kaba-shelf-less
A less shelf implementation. Integrates with kaba
https://github.com/becklyn/kaba-shelf-less
Last synced: 3 months ago
JSON representation
A less shelf implementation. Integrates with kaba
- Host: GitHub
- URL: https://github.com/becklyn/kaba-shelf-less
- Owner: Becklyn
- License: bsd-3-clause
- Created: 2016-12-13T12:47:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T19:21:19.000Z (about 8 years ago)
- Last Synced: 2025-01-14T03:14:01.642Z (4 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
kaba-shelf-less
===============A [kaba] shelf implementation of the [less] compiler.
Installation
------------Just install via npm / yarn:
```bash
yarn add kaba-less
```Usage
-----In your `kabafile.js` use it like any other shelf task:
```js
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:
| Option | Type | Description | Default value | Comment |
| ---------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `input` | `string` | A 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. |
| `output` | `string` | The output dir for compiled files | `"../../public/css"` | This path is relative to the (resolved) `input` path for the given file. |
| `browsers` | `array` | The 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. |
| `outputFileName` | `function(string, string) : string` | Optional 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. |
| `debug` | `boolean` | Flag, whether a debug build should be generated. | if `--debug` is set `true`, `false` otherwise | |
| `watch` | `boolean` | Flag, whether a watcher should be started. | if `--debug` is set `true`, `false` otherwise | |[kaba]: https://github.com/Becklyn/kaba
[less]: http://lesscss.org/
[glob]: https://www.npmjs.com/package/glob
[autoprefixer]: https://www.npmjs.com/package/autoprefixer