diff --git a/Gruntfile.js b/Gruntfile.js index 646994a..edbd452 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -27,6 +27,18 @@ module.exports = function(grunt) { } }, + browserSync: { + dev: { + bsFiles: { + src: ['dist/**/*', 'examples/**/*'] + }, + options: { + watchTask: true, + server: './' + } + } + }, + concat: { dist: { files: { @@ -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 } } }); @@ -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'); @@ -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']); }; diff --git a/package.json b/package.json index 14f902c..f36ebb1 100644 --- a/package.json +++ b/package.json @@ -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",