# Conflicts: # bin/cake # bin/coffee # documentation/sections/changelog.md # documentation/sections/installation.md # documentation/sections/introduction.md # lib/coffee-script/index.js # lib/coffee-script/nodes.js # lib/coffee-script/rewriter.js # lib/coffee-script/sourcemap.js # lib/coffeescript/browser.js # lib/coffeescript/cake.js # lib/coffeescript/coffeescript.js # lib/coffeescript/command.js # lib/coffeescript/grammar.js # lib/coffeescript/helpers.js # lib/coffeescript/lexer.js # lib/coffeescript/optparse.js # lib/coffeescript/register.js # lib/coffeescript/repl.js # lib/coffeescript/scope.js # package.json
1.0 KiB
Installation
The command-line version of coffee is available as a Node.js utility. The [core compiler](/v<%= majorVersion %>/browser-compiler/coffeescript.js) however, does not depend on Node, and can be run in any JavaScript environment, or in the browser (see Try CoffeeScript).
To install, first make sure you have a working copy of the latest stable version of Node.js. You can then install CoffeeScript globally with npm:
npm install --global coffeescript@next
This will make the coffee and cake commands available globally.
When you need CoffeeScript as a dependency of a project, within that project’s folder you can install it locally:
npm install --save coffeescript@next
The coffee and cake commands will first look in the current folder to see if CoffeeScript is installed locally, and use that version if so. This allows different versions of CoffeeScript to be installed globally and locally.