0.11.0 • Published 10 years ago
gulp-chained-preprocessors v0.11.0
Gulp Chained Preprocessors
Gulp renderer for chained preprocessors
Installation
npm install --save-dev gulp-chained-preprocessorsInstall preprocessors you want to use, i.e.:
npm install --save coffee-script node-sass handlebars commonmark ejsUsage
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