VCL preprocessor
The VCL preprocessor allows to create builds from NPM based CSS modules. It is based on the postcss processor framework.
Usage
Installation
$ npm install -g vcl-preprocessor
Command Line
Usage: vcl-preprocessor <input> [output] Options: --version, -v Show version number --help, -h Show help --watch, -w watches the input file
The vcl cli will create the destination directory if it does not exist.
API
var vcl = ; // will return the finished cssvar process = ; process; // will process a package including its dependencies// package needs to have a `style` property pointing to the main styl filevar process = vcl; process;
This function will return the generated CSS code as string that can be written to a file for example.
Entry CSS File
The following ways to import CSS files are supported:
;;;
Features
- Node module and local file imports via postcss-import.
- CSS level 4 variables syntax postcss-css-variables.
- Support for color functions such as
rgba()
via postcss-color-function. - Support for CSS level 4 proposed
color()
function via [postcss-color-function]. - Support for
lighten|darken({color}, {amount}%)
function via [rucksack-css]. - Inheritance support via [rucksack-css].
- Custom media to do things like
@media (--narrow-window)
via [rucksack-css]. - Easing functions via [rucksack-css].
- Simple
clear: fix
construct via [rucksack-css]. - Namespacing via postcss-add-namespace.