csegames/cu-ui — pull request #3 by phairoh (2014-07-16 15:06:03+00:00)
Title: Feature - Add Node and Grunt

This adds Node and Grunt to the project to more easily allow for development on non Microsoft platforms (i.e. OS-X and Linux).

**Requires**
* [Node](http://nodejs.org/)
* grunt-cli

**Instructions**
* Install [Node](http://nodejs.org/)
* Install grunt-cli
* After node is installed, at the command line run: ```npm install -g grunt-cli```
* Clone the project
* ```cd``` to project directory
* ```npm install```
* ```grunt```

The final command, ```grunt```, will:
* Compile all the .ts files into .js and .js.map files
* Start a web server at port 8080 at the root directory
* Create a watch on all .ts files in the project so if any change is seen they are immediately recompiled
* Opens the default web browser to the login module
* The module that is opened can be easily changed by using the ```--module``` option. For example, if we wanted the chat module to initially open we would use: ```grunt --module=chat```. This only changes the module that is loaded immediately in the web browser upon running ```grunt``` as no matter what all modules are accessible simply by changing the url in the browser.

**Notes***
* Needed to add a couple things to .gitignore.
* ```node_modules/```: This is where the required local node_modules live
* ```.idea/```: Required for the IDE I use (WebStorm). Probably doesn't need to be included for everyone
* ```.tscache/```: Used internally by grunt-ts
* ```!GruntFile.js```: Previously all .js files were being ignored but this one needs an exception in order for grunt to function. I have read that there may be a way to write this file in typescript although I don't have experience with this.
* In GruntFile.js I left in all the options for the grunt-ts task, just commented out. This was to allow for people to more easily make modifications if desired.