User Tools

Site Tools

Table of Contents

JavaScript

JavaScript is the lingua franca of the web. We use it for web pages, obviously. But we also use it when creating cross-platform mobile apps with Cordova (AKA PhoneGap). We occasionally use Node.js for serving HTTP – usually for WebSockets. The JavaScript development landscape has grown a lot recently, including a lot of tooling written in JavaScript.

Installation

We install the V8 JavaScript interpreter, Node.js, and npm (the node package manager) with a single Homebrew command:

brew install node

Installing Packages

We install packages via npm.

First, we'll install Express, for cases where we want to build a web server with a little more than the basics that Node.js gives us. We'll install CoffeeScript, our preferred JavaScript "dialect", and LESS, the JavaScript preferred "dialect" for CSS. We'll also install Jade, which is basically the JavaScript version of HAML.