mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Make grunt watch (for scripts) work again, settings were being overwritten by the new watch-style command
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user