gulp-chained-preprocessors

0.11.0 • Public • Published

Gulp Chained Preprocessors

Gulp renderer for chained preprocessors

Installation

npm install --save-dev gulp-chained-preprocessors

Install preprocessors you want to use, i.e.:

npm install --save coffee-script node-sass handlebars commonmark ejs
 

Usage

In basic usage you just pass same options as you would pass to chained preprocessors. And some of the options this plugin try to figure out itself like sass.includePaths for including sass files relatively to the file.

var chainedPreprocessors = require('gulp-chained-preprocessors');
 
gulp.task('preprocess', function() {
  var options = { all: { title: 'Hello World' } };
  gulp.src('./src/*')
    .pipe(chainedPreprocessors(options))
    .pipe(gulp.dest('./build/'));
});
 

You can also pass options dependent on file:

var chainedPreprocessors = require('gulp-chained-preprocessors');
 
gulp.task('preprocess', function() {
  var options = (file) => {
    { all: { title: file.path } }
  };
  gulp.src('./src/*')
    .pipe(chainedPreprocessors(options))
    .pipe(gulp.dest('./build/'));
});
 

n

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-chained-preprocessors

Weekly Downloads

1

Version

0.11.0

License

MIT

Last publish

Collaborators

  • welldan97