We'll call this installment #2 of "Adventures in Node.js" even though my previous Node entry didn't have this in mind.
I'm short on time today so I can't elaborate so much but in short:
One time on your machine:
- Install Python 2.7 and add the python.exe folder location to your PATH environment variable.
- Either 1 or 2 depending on your setup:
- If you don't have Visual Studio 2008 installed (which provides vcbuild.exe):
- install the Windows SDK (to provide vcbuild.exe). Good reference at https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup then ensure that the path to vcbuild.exe is in your PATH environment variable
- npm install -g socket.io --msvs_version=2012
- If you DO have VS installed, run the following to setup your environment properly:
- Add the path to vcbuild.exe to your PATH environment variable then run the following
- npm install -g node-gyp
- node-gyp configure --msvs_version=2012
- node-gyp build
- npm install -g socket.io --msvs_version=2012
Once for your project:
- npm install
Now your project should be ready for you to use npm in general. My purpose today was to check out grunt, grunt-cli and grunt-devtools thanks to recommendations from Paul Irish both at Google I/O 2013 and a couple weeks ago at the Chrome Dev Summit.
Now that I have npm working it was as simple as (from http://gruntjs.com/getting-started#preparing-a-new-grunt-project):
- npm install -g grunt-cli
- npm install grunt --save-dev
- npm install grunt-devtools
Next I try to setup and use Yeoman (another framework he suggested that relies on Grunt).