Enable "Incremental Builds"
Supposedly MSBuild can intelligently run build targets if they specify an "Inputs" and "Outputs" parameter. What it will try to do is compare timestamps of the input files to the output files and if the input files are newer it will run the target. See Incremental Builds for more details.
I tried implementing this in my own grunt and npm build targets but it wasn't working so I gave up but maybe someone else can figure it out.
https://gist.github.com/carlin-q-scott/718361d78955f980205b
Hi @carlin-q-scott, I have a workaround for your issue, you can use a gulp package called "gulp-newer", it will skip files in the gulp pipeline. For example:
gulp.task('bundle-vendor-js', ['restore-bower'], function() { return gulp.src(config.vendorJs) .pipe(newer(config.scriptOut + 'vendor.min.js')) .pipe(strip()) .pipe(concat('vendor.min.js')) .pipe(gulp.dest(config.scriptOut)); });
In this way, it checks the latest modified time of vendor.min.js, and compare to all files defined in config.vendorJs. If no newer files, it will skip.
Hope it helps.
I'm not using gulp so I suspect that doesn't solve my problem. Meanwhile I figured out how to get MSBuild to recognize changes for npm.