Skip to content

Instantly share code, notes, and snippets.

@russiann
Created May 19, 2015 00:46
Show Gist options
  • Save russiann/5715cd432805371c580f to your computer and use it in GitHub Desktop.
Save russiann/5715cd432805371c580f to your computer and use it in GitHub Desktop.
Simple Server with BrowserSync
var gulp = require('gulp'),
jade = require('gulp-jade'),
browserSync = require('browser-sync').create(),
reload = browserSync.reload;
gulp.task('jade', function() {
gulp.src('./index.jade')
.pipe(jade())
.pipe(gulp.dest('./'))
.pipe(reload({stream:true}));
});
gulp.task('serve', ['jade'], function () {
// Cria o server
browserSync.init({
server: {
baseDir: "./"
}
});
// inicia o watch
gulp.watch(['./**/*.jade','./**/*.css','./assets/js/main.js'], ['jade']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment