Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My GruntFile.js setup for BrowserSync. I turn off ghost mode for independent play on various devices. Also since I had issues with iPhone connecting to my server I added a named tunnel.
browserSync: {
dev: {
bsFiles: {
src : 'style.css'
},
options: {
proxy: "local.testing.dev",
ghostmode: false,
port: 8080,
tunnel: "testing", // < Used for iPhone testing
watchTask: true // < VERY important
}
}
}
//The "end" of my gruntfile config looks like this
grunt.loadNpmTasks('grunt-browser-sync');
// register task - Note you HAVE to add browserSync before watch
grunt.registerTask('default', ['browserSync', 'sass', 'uglify', 'imagemin', 'autoprefixer','watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.