Skip to content

Commit

Permalink
Updating build function so that it will ignore dir.txt placeholder fi…
Browse files Browse the repository at this point in the history
…les, and also now considers HTML. Fixes #14.
  • Loading branch information
Anthony Hastings committed Mar 10, 2015
1 parent 1f738c8 commit c70a948
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Empty file added html/dir.txt
Empty file.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"handlebars": "^3.0.0",
"hbsfy": "^2.2.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
"vinyl-source-stream": "^1.1.0",
"merge-stream": "0.1.7"
}
}
14 changes: 10 additions & 4 deletions run/tasks/build/gulp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@

var gulp = require('gulp'),
args = require('yargs').argv,
globalSettings = require('../../_global');
globalSettings = require('../../_global'),
mergeStream = require('merge-stream');

gulp.task('build', ['styles', 'scripts'], function() {
return gulp.src(['./fonts/**/*', './img/**/*'], { base: './' })
.pipe(gulp.dest(globalSettings.destPath));
});
var htmlStream = gulp.src(['./html/**/*.html'])
.pipe(gulp.dest(globalSettings.destPath));

var assetStream = gulp.src(['./fonts/**/!(dir.txt)', './img/**/!(dir.txt)'], { base: './' })
.pipe(gulp.dest(globalSettings.destPath));

return mergeStream(htmlStream, assetStream);
});

0 comments on commit c70a948

Please sign in to comment.