Appendix D. Installing Node.js and Gulp.js

 

This appendix covers

  • Installing Node.js
  • Installing Gulp.js

Gulp.js is a JavaScript-based tasked runner that runs in Node.js. This appendix guides you through installing these two applications.

D.1. Installing Node.js

Apart from Gulp.js, chapter 9 has another fundamental requirement. Gulp.js runs on Node.js, so you need to have that installed to follow along. You can find Node.js at https://nodejs.org/download. At the Node.js site, you can also find the installer that matches your system. After you’ve installed it, you can verify its installation by typing node –v from the command line:

C:\> node –v
V0.12.2

This tells you the version that was installed, and getting a proper response confirms the installation. With Node.js installed, you’re ready for your first look at Gulp.js.

D.2. Installing Gulp.js

To get started with Gulp.js, you first need to install it. With Node.js installed, this is easy. You’ll use the package manager (npm) that comes with Node.js (version 0.6 or higher). With npm, you can use a simple command from the command line to download and install Gulp.js.

In npm, what you install is called a package. Packages can be installed locally or globally (or both). You’ll use the –g option to install Gulp.js globally so you can run its commands from any directory. From the command line, run npm install –g gulp.

sitemap