gulp-vcl-preprocessor

The VCL preprocessor as a gulp task

Usage no npm install needed!

<script type="module">
  import gulpVclPreprocessor from 'https://cdn.skypack.dev/gulp-vcl-preprocessor';
</script>

README

VCL gulp-vcl-preprocessor

Build Status

The VCL preprocessor as a Gulp task.

Usage

var vcl = require('gulp-vcl-preprocessor');

gulp.task('css', function(){
  gulp.src('app/vcl/*.styl')
    .pipe(vcl({
      // optional options, get passed to vcl-preprocessor
    }))
    .pipe(gulp.dest('dist/css'));
});

Options

output

Specifies the output file. Defaults to the input file name plus the .css extension. If the package is set to true the output will default to style.css.

Example:

  • index.stylindex.css
  • package.jsonstyle.css

package

Pre-process a package instead of a single file. This fetches all dependencies and includes them in the final build.

The includeDevDependencies property that gets passed to the preprocessor can be quite useful when processing a package in development. It will include the dev dependencies as well as the normal ones.

Example:

gulp.task('css', function(){
  gulp.src('./package.json')
    .pipe(vcl({
      package: true, // parses input as package.json instead of trying to pre-process
      output: 'main.css', // output will be written to dist/css/main.css
      includeDevDependencies: true // gets passed to the vcl-preprocessor
    }))
    //.pipe(cssmin())
    .pipe(gulp.dest('dist/css'));
});