Use options.src instead of gulp.src for proper plumbing

This commit is contained in:
Dan Mindru 2016-05-25 22:37:41 +02:00
parent 68643a7b93
commit 55b41e2a54
6 changed files with 15 additions and 5 deletions

View File

@ -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.

View File

@ -39,7 +39,7 @@ function buildTask(options){
return prev += '<link rel="stylesheet" href="' + current + '">';
}, '');
gulp
options
.src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html'])
.pipe(preprocess({
context: conf

View File

@ -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']

View File

@ -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));
});

View File

@ -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']

View File

@ -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'
],