edwardhotchkiss/grunt-develop — pull request #6 by undashes (2013-06-14 19:49:38+00:00)
Title: Don't auto-reload on error, but reload on subsequent changes

Initial reasons for changes:

* when the spawned application was crashing, then the plugin was unable to restart it ever (the reason why is because `child.killed` stayed at `false`, even if the process was dead);
* sometimes when sending SIGINT (Ctrl-C) to Grunt, the spawned process was not killed, blocking the port for future use in case of a server, for example.

Actual changes:

* manually keep track of the state of the process, since Node.js's child_process does not seem to provide this information;
* reloads only when the task was explicitly called, not in case of an application crash (this avoids an infinite reload-crash loop);
* add a task in the Gruntfile to actually try the proper behavior of the kill/restart;
* some minor change of wording, 'server' -> 'application' because the node.js app can be something else than an server;
* update linting options to actually allow the tests to success (the option `es5` is apparently not needed anymore);
* advances the version to `0.0.3`.

Tests:

* `grunt looptest` works properly;
* `grunt looptest`, then Ctrl-C, then `ps`: no zombie process remains.