airbnb/rendr — pull request #325 by prt101g (2014-02-20 18:09:38+00:00)
Title: Change Order of Grunt Tasks In Examples To Prevent Nodemon Restarts During Compile Task

Currently, the grunt server task in the example apps is registered as follows:
```
grunt.registerTask('server', ['runNode', 'compile', 'watch']);
```
This causes nodemon to restart the server as the compile task makes changes to files resulting in the following:
```
[petebuntu::~/workspace/06_appview]
pete-> grunt server
Running "runNode" task

Running "handlebars:compile" (handlebars) task
20 Feb 19:18:43 - [nodemon] v0.7.10
20 Feb 19:18:43 - [nodemon] to restart at any time, enter `rs`
20 Feb 19:18:43 - [nodemon] watching: /home/pete/workspace/06_appview
20 Feb 19:18:43 - [nodemon] starting `node index.js`
File "app/templates/compiledTemplates.js" created.

Running "browserify:app" (browserify) task
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
server pid 10431 listening on port 3030 in development mode
>> Bundled public/mergedAssets.js

Running "browserify:tests" (browserify) task
20 Feb 19:18:48 - [nodemon] restarting due to changes...
20 Feb 19:18:48 - [nodemon] /home/pete/workspace/06_appview/public/mergedAssets.js

20 Feb 19:18:48 - [nodemon] starting `node index.js`
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
server pid 10441 listening on port 3030 in development mode
>> Bundled public/testBundle.js

Running "stylus:compile" (stylus) task
File public/styles.css created.

Running "watch" task
Waiting...20 Feb 19:18:53 - [nodemon] restarting due to changes...
20 Feb 19:18:53 - [nodemon] /home/pete/workspace/06_appview/public/testBundle.js

20 Feb 19:18:53 - [nodemon] starting `node index.js`
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
server pid 10443 listening on port 3030 in development mode
```
Ordering the tasks as follows solves this problem:
```
grunt.registerTask('server', ['compile', 'runNode', 'watch']);
```