Use options.src instead of gulp.src for proper plumbing
This commit is contained in:
parent
68643a7b93
commit
55b41e2a54
|
|
@ -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
|
- Stylesheets are included automatically, place them wherever in the dir
|
||||||
- Autoprefixer is there to help
|
- Autoprefixer is there to help
|
||||||
- use SASS, LESS or postcss.
|
- use SASS, LESS or postcss.
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ function buildTask(options){
|
||||||
return prev += '<link rel="stylesheet" href="' + current + '">';
|
return prev += '<link rel="stylesheet" href="' + current + '">';
|
||||||
}, '');
|
}, '');
|
||||||
|
|
||||||
gulp
|
options
|
||||||
.src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html'])
|
.src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html'])
|
||||||
.pipe(preprocess({
|
.pipe(preprocess({
|
||||||
context: conf
|
context: conf
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@ var gulp = require('gulp'),
|
||||||
|
|
||||||
function lessTask(options){
|
function lessTask(options){
|
||||||
gulp.task('less', ['dupe'], function(){
|
gulp.task('less', ['dupe'], function(){
|
||||||
return gulp.src(options.workingDir + '/**/*.less')
|
return options
|
||||||
|
.src(options.workingDir + '/**/*.less')
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(autoprefixer({
|
.pipe(autoprefixer({
|
||||||
browsers: ['last 5 versions']
|
browsers: ['last 5 versions']
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ function postcssTask(options){
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
return gulp.src(options.workingDir + '/**/*.css')
|
return options
|
||||||
|
.src(options.workingDir + '/**/*.css')
|
||||||
.pipe(postcss(processors))
|
.pipe(postcss(processors))
|
||||||
.pipe(gulp.dest(options.workingDir));
|
.pipe(gulp.dest(options.workingDir));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@ var gulp = require('gulp'),
|
||||||
|
|
||||||
function sassTask(options){
|
function sassTask(options){
|
||||||
gulp.task('sass', ['dupe'], function(){
|
gulp.task('sass', ['dupe'], function(){
|
||||||
return gulp.src(options.workingDir + '/**/*.scss')
|
return options
|
||||||
|
.src(options.workingDir + '/**/*.scss')
|
||||||
.pipe(sass())
|
.pipe(sass())
|
||||||
.pipe(autoprefixer({
|
.pipe(autoprefixer({
|
||||||
browsers: ['last 5 versions']
|
browsers: ['last 5 versions']
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ function watchTask(options){
|
||||||
[
|
[
|
||||||
options.source + '/**/*.html',
|
options.source + '/**/*.html',
|
||||||
options.source + '/**/*.css',
|
options.source + '/**/*.css',
|
||||||
options.source + '/**/*.sass',
|
options.source + '/**/*.scss',
|
||||||
options.source + '/**/*.less',
|
options.source + '/**/*.less',
|
||||||
options.source + '/**/conf.js'
|
options.source + '/**/conf.js'
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue