From 55b41e2a5465209028bb7563967b7b8280bf76f8 Mon Sep 17 00:00:00 2001 From: Dan Mindru Date: Wed, 25 May 2016 22:37:41 +0200 Subject: [PATCH] Use options.src instead of gulp.src for proper plumbing --- README.md | 7 +++++++ tasks/build.js | 2 +- tasks/less.js | 3 ++- tasks/postcss.js | 3 ++- tasks/sass.js | 3 ++- tasks/watch.js | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a1469c9..981d52e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +#Future release notes & todo +This is a beta release, some things still need to be done before it's ready. + +##Todo +- use fs-extra instead of wrench + +##Doc updates - Stylesheets are included automatically, place them wherever in the dir - Autoprefixer is there to help - use SASS, LESS or postcss. diff --git a/tasks/build.js b/tasks/build.js index 80a2f82..5370640 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -39,7 +39,7 @@ function buildTask(options){ return prev += ''; }, ''); - gulp + options .src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html']) .pipe(preprocess({ context: conf diff --git a/tasks/less.js b/tasks/less.js index 1fd8142..dcadf54 100644 --- a/tasks/less.js +++ b/tasks/less.js @@ -7,7 +7,8 @@ var gulp = require('gulp'), function lessTask(options){ gulp.task('less', ['dupe'], function(){ - return gulp.src(options.workingDir + '/**/*.less') + return options + .src(options.workingDir + '/**/*.less') .pipe(less()) .pipe(autoprefixer({ browsers: ['last 5 versions'] diff --git a/tasks/postcss.js b/tasks/postcss.js index 6985758..0a19f24 100644 --- a/tasks/postcss.js +++ b/tasks/postcss.js @@ -12,7 +12,8 @@ function postcssTask(options){ }) ]; - return gulp.src(options.workingDir + '/**/*.css') + return options + .src(options.workingDir + '/**/*.css') .pipe(postcss(processors)) .pipe(gulp.dest(options.workingDir)); }); diff --git a/tasks/sass.js b/tasks/sass.js index 07994a4..097e140 100644 --- a/tasks/sass.js +++ b/tasks/sass.js @@ -7,7 +7,8 @@ var gulp = require('gulp'), function sassTask(options){ gulp.task('sass', ['dupe'], function(){ - return gulp.src(options.workingDir + '/**/*.scss') + return options + .src(options.workingDir + '/**/*.scss') .pipe(sass()) .pipe(autoprefixer({ browsers: ['last 5 versions'] diff --git a/tasks/watch.js b/tasks/watch.js index 0c05671..c324a87 100644 --- a/tasks/watch.js +++ b/tasks/watch.js @@ -8,7 +8,7 @@ function watchTask(options){ [ options.source + '/**/*.html', options.source + '/**/*.css', - options.source + '/**/*.sass', + options.source + '/**/*.scss', options.source + '/**/*.less', options.source + '/**/conf.js' ],