diff --git a/client/grunt-tasks/scripts.js b/client/grunt-tasks/scripts.js index 9b61c88ceda..6bfdd71f005 100644 --- a/client/grunt-tasks/scripts.js +++ b/client/grunt-tasks/scripts.js @@ -56,7 +56,6 @@ module.exports = function( grunt ){ if (grunt.option( 'develop' )){ grunt.config( 'uglify.options', decompressedSettings ); - } else { grunt.config( 'uglify.target.options', { sourceMap : true, diff --git a/client/grunt-tasks/style.js b/client/grunt-tasks/style.js index 99a7d592d98..1ae7b3a27ee 100644 --- a/client/grunt-tasks/style.js +++ b/client/grunt-tasks/style.js @@ -78,16 +78,21 @@ module.exports = function( grunt ){ // -------------------------------------------------------------------------- watch & rebuild less files // use 'grunt watch-style' (from a new tab in your terminal) to have grunt re-copy changed files automatically - grunt.config( 'watch', { - watch: { - // watch for changes in the src dir - files: [ lessPath + '/**' ], - tasks: ['check-modules', 'sprite', 'less-site-config', 'less', 'clean'], - options: { - spawn: false + // + // the conditional prevents reconfiguration of 'normal' (.js) grunt watch from grunt-tasks/scripts.js + + if (this.cli.tasks.indexOf("watch-style") > -1){ + grunt.config( 'watch', { + watch: { + // watch for changes in the src dir + files: [ lessPath + '/**' ], + tasks: ['check-modules', 'sprite', 'less-site-config', 'less', 'clean'], + options: { + spawn: false + } } - } - }); + }); + } grunt.loadNpmTasks( 'grunt-contrib-less' ); grunt.loadNpmTasks( 'grunt-spritesmith' );