@vcl/preprocessor
The VCL preprocessor
Last updated 6 months ago by dani723 .
MIT · Original npm · Tarball · package.json
$ cnpm install @vcl/preprocessor 
SYNC missed versions from official npm registry.

VCL preprocessor

The VCL preprocessor allows to create builds from NPM based CSS modules. It is based on webpack and the postcss processor framework.

Installation

$ npm install @vcl/preprocessor

Usage

Command Line

Usage: vcl-preprocessor <input> <output>

Options: --version, -v Show version number --help, -h Show help --watch, -w watches the input file for changes --import-root, -i base directory for file based imports --optimize, o optimize css --source-map, -s generate source maps --source-map-inline, -si generate source maps

Examples:

vcl-preprocessor index.sss compiled.css     # Compile index.sss and output to compiled.css

The VCL CLI will create the destination directory if it does not exist.

echo "a\n  color: green" | vcl-preprocessor # Pipe string through preprocessor

API

var vcl = require('@vcl/preprocessor');

// Will compile the input file and store the result in the output file
vcl(inputFile, outputFile, opts).then((result) => {
  result.css; // compiled css
});

// Will compile the input file and store the result in the output file
// Also recompiles the output file on changes
vcl.compileFile(inputFile, outputFile, opts).then(...);

// Will return an array of postCSS plugins
var plugins = vcl.createPostCSSPlugins(opts);

Options

  • root [process.cwd()] base directory for file based imports.
  • sourceMap [false] creates a source map
  • optimize [false] optimizes css
  • url [true] follows urls

Entry CSS File

The following ways to import CSS files are supported:

@import "node-module-name";
@import "node-module-name/file";
@import "./local-file-relative-to-this.css";

Features

Current Tags

  • 0.6.3                                ...           latest (6 months ago)
  • 0.7.0-alpha.3                                ...           next (5 months ago)

43 Versions

  • 0.7.0-alpha.3                                ...           5 months ago
  • 0.7.0-alpha.1                                ...           6 months ago
  • 0.6.3                                ...           6 months ago
  • 0.6.2                                ...           9 months ago
  • 0.6.0-6                                ...           9 months ago
  • 0.6.0-1                                ...           9 months ago
  • 0.5.3                                ...           9 months ago
  • 0.4.6                                ...           9 months ago
  • 0.4.5                                ...           10 months ago
  • 0.4.3                                ...           10 months ago
  • 0.4.2                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.4.0-beta.3                                ...           a year ago
  • 0.4.0-beta.1                                ...           a year ago
  • 0.4.0-beta.0                                ...           a year ago
  • 0.4.0-4                                ...           a year ago
  • 0.4.0-3                                ...           a year ago
  • 0.4.0-2                                ...           a year ago
  • 0.4.0-1                                ...           a year ago
  • 0.4.0-0                                ...           a year ago
  • 0.3.0-16                                ...           a year ago
  • 0.3.0-15                                ...           a year ago
  • 0.3.0-14                                ...           a year ago
  • 0.3.0-13                                ...           a year ago
  • 0.3.0-12                                ...           a year ago
  • 0.3.0-11                                ...           a year ago
  • 0.3.0-10                                ...           a year ago
  • 0.3.0-9                                ...           a year ago
  • 0.3.0-8                                ...           a year ago
  • 0.3.0-7                                ...           a year ago
  • 0.3.0-6                                ...           a year ago
  • 0.3.0-4                                ...           a year ago
  • 0.3.0-3                                ...           a year ago
  • 0.3.0-2                                ...           a year ago
  • 0.3.0-1                                ...           a year ago
  • 0.2.9                                ...           a year ago
  • 0.2.8                                ...           a year ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 1
Dependencies (20)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |