Skip to content

Instantly share code, notes, and snippets.

Created Apr 21, 2016
What would you like to do?
Rails, Gulp, and Browsersync together at last
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var setupWatchers = function() {['./app/views/**/*.erb',
'./app/assets/javascripts/**/*.js'], ['reload']);['./app/assets/stylesheets/**/*.scss'], ['reloadCSS'])
gulp.task('reload', function(){
return browserSync.reload();
gulp.task('reloadCSS', function() {
return browserSync.reload('*.css');
gulp.task('init', function() {
proxy: '',
port: 8000,
open: false,
ui: {
port: 8001
gulp.task('default', ['init']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment