bb5a3b52 by Adam Heath

Do the src/scripts fixup without regard to the value of withCoverage.

1 parent b7140c57
...@@ -407,6 +407,20 @@ module.exports = function (grunt) { ...@@ -407,6 +407,20 @@ module.exports = function (grunt) {
407 baseUrl: mpConfig.base + '/scripts', 407 baseUrl: mpConfig.base + '/scripts',
408 }, 408 },
409 }; 409 };
410 template = _.extend({}, template, {
411 process: (function(origProcess) {
412 return function process(grunt, task, context) {
413 var src = [];
414 context.scripts.src.forEach(function(file) {
415 if (!grunt.file.isMatch(specs, file)) {
416 src.push(file);
417 }
418 });
419 context.scripts.src = src;
420 return origProcess.apply(this, arguments);
421 };
422 })(template.process),
423 });
410 if (mpConfig.jasmine.withCoverage) { 424 if (mpConfig.jasmine.withCoverage) {
411 var instrumentationCallback = function instrumentationCallback(mpConfigBase) { 425 var instrumentationCallback = function instrumentationCallback(mpConfigBase) {
412 /* global requirejs:false */ 426 /* global requirejs:false */
...@@ -448,20 +462,7 @@ module.exports = function (grunt) { ...@@ -448,20 +462,7 @@ module.exports = function (grunt) {
448 coverage: 'dist/coverage/coverage.json', 462 coverage: 'dist/coverage/coverage.json',
449 report: 'dist/coverage', 463 report: 'dist/coverage',
450 replace: false, 464 replace: false,
451 template: _.extend({}, template, { 465 template: template,
452 process: (function(origProcess) {
453 return function process(grunt, task, context) {
454 var src = [];
455 context.scripts.src.forEach(function(file) {
456 if (!grunt.file.isMatch(specs, file)) {
457 src.push(file);
458 }
459 });
460 context.scripts.src = src;
461 return origProcess.apply(this, arguments);
462 };
463 })(template.process),
464 }),
465 templateOptions: templateOptions, 466 templateOptions: templateOptions,
466 files: _.concat([], src, specs), 467 files: _.concat([], src, specs),
467 }; 468 };
......