Last active
August 29, 2015 14:13
-
-
Save JohnLauber/d1b3e6768f2638036a85 to your computer and use it in GitHub Desktop.
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.
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
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