Skip to content

Instantly share code, notes, and snippets.

@kurtbartholomew
Last active August 29, 2015 14:27
Show Gist options
  • Save kurtbartholomew/3efa16ca8c8eb7910400 to your computer and use it in GitHub Desktop.
Save kurtbartholomew/3efa16ca8c8eb7910400 to your computer and use it in GitHub Desktop.
Extremely basic gulp dev file (proxy to backend server)
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var options = {
javascript:'client/public/src/**/*.js',
styles:'client/public/src/assets/css/*.css',
html:'client/public/src/**/*.html',
host: 'localhost:8000'
};
gulp.task('serve',function(){
browserSync.init({
proxy: HOST,
notify: false
});
gulp.watch(options.javascript).on('change',browserSync.reload);
gulp.watch(options.styles).on('change',browserSync.reload);
gulp.watch(options.html).on('change',browserSync.reload);
});
gulp.task('default', ['serve']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment