Skip to content

Commit

Permalink
vendor directory in gulp serve, new gulp task: serve-bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
mwasiluk committed Aug 13, 2016
1 parent 643b434 commit 2ac033b
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,37 @@ var onError = function (err) {
this.emit('end');
};


var browserSyncInit = function(baseDir){
browserSync.init({
server: {
baseDir: baseDir,
index: "demo.html",
routes: {
"/bower_components": "bower_components",
"/vendor": "vendor",
"/dist": "dist",
"/i18n": "i18n"
}
},
port: 8080,
open: 'local',
browser: "google chrome"
});
};

var gulpWatch = function(){
gulp.watch(['i18n/**/*.json', './src/**/*.html', './styles/*.*css', 'src/**/*.js'], ['default-watch']);
};

gulp.task('default-watch', ['default'], ()=>{ browserSync.reload() });

gulp.task('serve', ['default'], ()=>{
browserSync.init({
server: {
baseDir: "demo-material",
index: "demo.html",
routes: {
"/bower_components": "bower_components",
"/dist": "dist",
"/i18n": "i18n"
}
},
port: 8080,
open: 'local',
browser: "google chrome"
});
gulp.watch(['i18n/**/*.json', './src/**/*.html', './styles/*.*css', 'src/**/*.js'], ['default-watch']);
});
browserSyncInit("demo-material");
gulpWatch();
});

gulp.task('serve-bootstrap', ['default'], ()=>{
browserSyncInit("demo");
gulpWatch();
});

0 comments on commit 2ac033b

Please sign in to comment.