Skip to content

BeadList/gulp-chained-preprocessors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gulp Chained Preprocessors

Gulp renderer for [chained preprocessors][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][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 [chained-preprocessors]: https://github.com/BeadWall/chained-preprocessors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published