Book Image

Mastering D3.js

By : Pablo Navarro Castillo, Pablo Navarro Castillo
Book Image

Mastering D3.js

By: Pablo Navarro Castillo, Pablo Navarro Castillo

Overview of this book

Table of Contents (19 chapters)
Mastering D3.js
About the Author
About the Reviewers

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 ( 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...