diff --git a/Gruntfile.js b/Gruntfile.js index 9b0f8f9..7680e14 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -93,9 +93,21 @@ module.exports = function(grunt) { }, watch: { + options: { + atBegin: true + }, files: ['src/**/*.js', 'src/**/*.css', 'package.json'], tasks: ['build'] }, + + connect: { + server: { + options: { + port: 8002, + hostname: '*' + } + } + } }); // build @@ -104,8 +116,8 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-bump'); grunt.loadNpmTasks('grunt-shell'); + grunt.loadNpmTasks('grunt-contrib-connect'); grunt.registerTask('build', ['uglify', 'concat']); grunt.registerTask('release', ['bump-only:patch', 'uglify', 'concat', 'bump-commit', 'shell:push', 'shell:pushTags']); - grunt.registerTask('w', ['build', 'watch']); - grunt.registerTask('default', 'build'); + grunt.registerTask('default', ['connect', 'watch']); }; diff --git a/package.json b/package.json index 0d5f400..57cf36e 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "grunt-contrib-concat": "~0.3.0", "grunt-contrib-watch": "~0.5.3", "grunt-bump": "0.0.14", - "grunt-shell": "~0.7.0" + "grunt-shell": "~0.7.0", + "grunt-contrib-connect": "~0.10.1" } }