Skip to content

Commit

Permalink
Add browserSync
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Apr 25, 2015
1 parent ecd0100 commit f6eace4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ module.exports = function(grunt) {
}
},

browserSync: {
dev: {
bsFiles: {
src: ['dist/**/*', 'examples/**/*']
},
options: {
watchTask: true,
server: './'
}
}
},

concat: {
dist: {
files: {
Expand Down Expand Up @@ -121,14 +133,11 @@ module.exports = function(grunt) {

watch: {
src: {
files: ['src/**/*', 'test/**/*', 'examples/**/*'],
files: ['src/**/*', 'examples/**/*'],
tasks: ['build']
},
options: {
spawn: false,

// Use browser extensions of LiveReload
livereload: true
spawn: false
}
}
});
Expand All @@ -140,6 +149,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-browser-sync');
grunt.loadNpmTasks('grunt-csscomb');
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-jscs');
Expand All @@ -148,5 +158,6 @@ module.exports = function(grunt) {
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('test', ['connect', 'lint', 'qunit']);
grunt.registerTask('build', ['concat', 'autoprefixer', 'csscomb', 'uglify', 'githooks']);
grunt.registerTask('bsync', ['browserSync', 'watch']);
grunt.registerTask('default', ['test', 'build']);
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"bower": "^1.4.1",
"grunt": "^0.4.5",
"grunt-autoprefixer": "^3.0.0",
"grunt-browser-sync": "^2.1.2",
"grunt-cli": "^0.1.13",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-connect": "^0.10.1",
Expand Down

0 comments on commit f6eace4

Please sign in to comment.