The project setup
In this section, we will install and configure the tools that we will use to build our package. We will assume that you know how to use the command line and you have Node installed on your system. You can install Node by either following the instructions from Node.js's website (http://nodejs.org/download/) or using a package manager in Unix-like systems.
Installing the Node modules
The Node Package Manager (npm) is a program that helps us to manage dependencies between Node projects. As our project could be a dependency of other projects, we need to provide information about our package to npm. The package.json
file is a JSON file that should contain at least the project name, version, and dependencies for use and development. For now, we will add just the name and version:
{ "name": "windmill", "version": "0.1.0", "dependencies": {}, "devDependencies": {} }
We will install Grunt, Vows, Bower, and D3 using npm
. When installing a package, we can pass an option to save...