gruntjs/grunt-contrib-concat — pull request #106 by jacksonrayhamilton (2014-09-28 20:40:21+00:00)
Title: Have `nonull: true` cause the task to warn and abort.

Previously, specifying `nonull: true` would only cause the task to log a warning about a file being missing. This change modifies the task to issue a "real" warning and abort the task chain.

It is rather nasty when concatenation skips over a file because you forgot to include it in your project. Say a developer is using `bower link` to develop some bower packages and is concatenating all his libraries into a `vendors.js` file. On a fresh clone he might forget to run `bower link package-name`, and then be confused by the fact that `vendors.js` is generated but is missing a package.

The current behavior of `nonull: true` begins to solve this problem, unless you have a long list of tasks and the warning gets buried in your console history. Having a warning at the tip of your console history immediately alerts you of a potential issue. Also, considering you specified the `nonull: true` option, you have acknowledged that some paths have the potential to *not* match and would really, really like to know if they don't.

I imagine it may have been difficult to test this functionality before (if anyone had ever desired it) because the previous set of tasks analyzed the output of the main Gruntfile's `initConfig` `concat`. I was able to test warnings and task-abortion by analyzing the `stdout` of `child_process#exec`.

Please consider this pull request. I believe that fail-fast functionality is much more efficient for development.