CoffeeScript
coffeescript.org
- Free plan
- Windows
- macOS
- Linux
- Web
- API
What CoffeeScript is
CoffeeScript is a free, open-source language that compiles source code into equivalent JavaScript, so programs run without a CoffeeScript interpreter at runtime. Existing JavaScript libraries can be used from CoffeeScript, and JavaScript can use CoffeeScript libraries. CoffeeScript 2 emits modern syntax such as classes and arrow functions and supports async functions and JSX. The coffee command runs scripts, compiles .coffee files to .js, and opens an interactive REPL, while generating external or inline source maps. Installation uses npm globally or within a project. The core compiler runs in any JavaScript environment, including a browser; the command-line utility requires Node 6 or later. Babel transpilation is built in when @babel/core is installed. Integrations include Gulp, Webpack, Grunt, Broccoli, Atom, Emacs, Vim, Visual Studio Code, and Jest. A Node API compiles strings and can produce source maps or an abstract syntax tree.
Who it suits
CoffeeScript suits developers who want source-to-source JavaScript compilation with a concise language and access to JavaScript libraries. It also fits projects using npm, build tools, supported editors, or Jest.
Good to know, and what to watch
- Free and open source
- Compiles to JavaScript without runtime interpretation
- Supports modern syntax, async functions, and JSX
- Provides CLI, REPL, source maps, and compiler API
- Integrates with build tools, editors, and Jest
- JSX output always requires transpilation
- Command-line utility requires Node 6 or later
- Modules require Node 12 or later with package configuration
- Runtime must support used modern JavaScript features
The verdict
CoffeeScript combines JavaScript interoperability with command-line, API, editor, and build-chain integration. Teams must account for transpilation requirements and the runtime support needed by their generated code.
What the maker publishes
- Browser use
- The core compiler does not depend on Node and can run in any JavaScript environment, including a browser. source
- Command line
- The coffee command can execute scripts, compile .coffee files to .js, and provide an interactive REPL. source
- Command line
- The `coffee` command can execute scripts, compile `.coffee` files into `.js`, and provide an interactive REPL. source
- Compatibility
- CoffeeScript can use existing JavaScript libraries, and JavaScript can use CoffeeScript libraries. source
- Compatibility limit
- JSX output always requires transpilation, and CoffeeScript says users are responsible for ensuring their runtime supports the modern features they use or transpiling the output. source
- Compiler API
- The Node API can compile strings of CoffeeScript and optionally generate source maps or an abstract syntax tree. source
- Editor and framework support
- The integrations section links to resources for build tools, code editors, frameworks, linters and formatting, and testing. source
- Editor support
- The integrations page lists CoffeeScript support for code editors including Atom, Emacs, Vim, and Visual Studio Code. source
- Installation
- CoffeeScript is installed through npm, either globally or as a project dependency. source
- Integrations
- The integrations page lists Gulp, Webpack, Grunt, and Broccoli as JavaScript build-chain tools. source
- Integrations
- The compiler supports Babel transpilation, and the site lists Gulp, Webpack, Grunt, and Broccoli as build-chain options. source
- JavaScript libraries
- Existing JavaScript libraries can be used from CoffeeScript and vice versa. source
- Language features
- CoffeeScript 2 includes async function and JSX syntax support. source
- Modern JavaScript
- CoffeeScript 2 compiles to modern JavaScript syntax and includes support for async functions and JSX. source
- Modern output
- CoffeeScript 2 produces modern JavaScript syntax, including JavaScript classes and arrow functions. source
- Node.js
- The command-line utility requires Node 6 or later, while the core compiler can run in any JavaScript environment or in a browser. source
- Purpose
- CoffeeScript is a language that compiles into JavaScript. source
- Purpose
- CoffeeScript is a language that compiles into JavaScript. source
- Runtime
- CoffeeScript compiles to equivalent JavaScript with no interpretation at runtime. source
- Runtime
- CoffeeScript compiles to equivalent JavaScript without runtime interpretation. source
- Runtime compatibility
- The maker notes that JSX output always requires transpilation and that modules require Node 12 or later with type set to module in package.json. source
- Runtime requirements
- The command-line utility requires Node 6 or later; the site says most supported modern JavaScript features run natively in Node 7.6 or later. source
- Source maps
- The command line supports generating external or inline source maps alongside compiled JavaScript. source
- Support
- The maker directs bug reports, feature proposals, and ideas to its GitHub issues page and identifies a mailing list as a place to ask questions. source
Checked against the maker's pages on 3 Oct 2026.