MDL-86839 grunt: Make grunt watch respect --force option
This commit is contained in:
@@ -49,6 +49,10 @@ module.exports = grunt => {
|
||||
|
||||
// Spawn the task in a child process so that it doesn't kill this one
|
||||
// if it failed.
|
||||
var args = [task, filesOption];
|
||||
if (grunt.option('force')) {
|
||||
args.push('--force');
|
||||
}
|
||||
grunt.util.spawn(
|
||||
{
|
||||
// Spawn with the grunt bin.
|
||||
@@ -58,7 +62,7 @@ module.exports = grunt => {
|
||||
cwd: grunt.moodleEnv.fullRunDir,
|
||||
stdio: 'inherit'
|
||||
},
|
||||
args: [task, filesOption]
|
||||
args: args
|
||||
},
|
||||
function(err, res, code) {
|
||||
if (code !== 0) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
issueNumber: MDL-86839
|
||||
notes:
|
||||
core:
|
||||
- message: >
|
||||
"grunt watch" now accepts a force flag. Run "grunt watch -f" or "grunt
|
||||
watch --force" to prevent grunt from cancelling builds when errors
|
||||
occur. This is especially useful during development, because js build
|
||||
files will be built even if, for example, jslint errors are still
|
||||
present in the files.
|
||||
type: improved
|
||||
Reference in New Issue
Block a user