Game Development Reference
In-Depth Information
> npm install -g grunt-cli
This command will install Grunt's command line tools. From there you can install Grunt into
your project.
> npm install grunt -save-dev
This will update our package.json with information on the module we just installed. This is
critical for sharing your build with others so they can clearly see the dependencies your pro-
ject may have. If you open up your package.json file you will now see a new object at the
end called devDependencies.
"devDependencies": {
"grunt": "~0.4.1"
}
Now you will have everything you need to run Grunt; we just need to install two simple
tasks to allow us to run a server in our project.
>npm install grunt-contrib-connect -save-dev
The last thing we will need is a way to open up a URL.
>npm install grunt-open -save-dev
By now your devDependencies should look something like this:
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-connect": "~0.2.0",
"grunt-open": "~0.2.0"
}
From here we will need to set up a GruntFile. Think of this as our Ant build.xml. Create a
new GruntFile.js in your project and add the following to it:
Search WWH ::




Custom Search