A bit about Node.js and how to some steps to get some experience with it. If you are like me sometimes you can’t quite get your head around something until you start to use it.
Install Node.js from the node website. http://nodejs.org/download/. You can choose the 32bit or 64bit .msi or .exe. For me it installed into C:\Program Files\nodejs. In a command prompt you can verify this by typing:
The installer will install Node and NPM (a package manager). We will use NPM to install several things. In a command prompt window type or paste this to install Yeoman:
The “-g” will install it globally on your system and not just in the project at hand. Leave off the “-g” if you want it to only install in the current project. Next install Grunt:
Bower is a package manager for the web. Bower runs over Git, and is package-agnostic. Bower depends on Node and npm. It’s installed globally using npm.
Make sure that git is installed, as some bower packages require it to be fetched and installed.
To use Bower on Windows, install msysgit from http://git-scm.com/downloads/. Be sure to check the “Run Git from the Windows Command Prompt” option on the Adjusting your PATH environment screen of the install wizard. (If you instead install github-for-windows (http://windows.github.com) it does not add GIT commands to windows command prompt)
Now you have got all of the tools. Use NPM to get a Yeoman webapp generator. A Yeoman generator will add project files to a folder, then Grunt can use those files to build and stuff.
Once that is downloaded run this to set it up:
If instead of the generic webapp generator you wanted the angular generator you would first download it:
and then run it:
In the command window you will be asked some questions that you use your keyboard to answer. “Sass with Compass” needs Ruby installed so deselect that if you do not have Ruby installed. That process can take awhile and when it is done you are back to a prompt with a blinking cursor. If you are not then it did not finish and is not ready to build.
When it does complete you can build and view your project with:
Or just plain:
for a production build. And to run the tests:
Comments can happen here: /blog/issues/14[ Words: 586 ]