Last active
September 2, 2016 07:03
-
-
Save romamaslennikov/5c7702a1f03da0f6d0143c3d8fd91e4c to your computer and use it in GitHub Desktop.
RoR gupl-browser-sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var paths = { | |
app: ['./app/assets/stylesheets/**/*.scss', | |
'./app/assets/javascripts/**/*.js', | |
'./app/assets/javascripts/**/*.coffee', | |
'./app/views/**/*.haml'] | |
}; | |
gulp.task('dev', function() { | |
var reload = browserSync.reload; | |
browserSync({ | |
proxy: 'localhost:3000', | |
notify: false, | |
open: false | |
}); | |
gulp.watch(paths.app, function() { | |
return gulp.src(paths.app) | |
.pipe(reload({stream: true})); | |
}); | |
}); | |
gulp.task('default', ['dev']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "yodo", | |
"version": "1.0.0", | |
"description": "", | |
"directories": { | |
"test": "test" | |
}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git" | |
}, | |
"author": "", | |
"license": "ISC", | |
"homepage": "", | |
"devDependencies": { | |
"browser-sync": "^2.14.0", | |
"gulp": "^3.9.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm up -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment