CoffeeScript is a language that compiles one-to-one into JavaScript with no runtime interpreter. The coffee command runs, compiles, and REPL-tests .coffee sources via Node.js.
Overview
CoffeeScript exposes a concise syntax for functions, conditionals, comprehensions, splats, and existence checks while emitting readable JavaScript output. Compiled code can call any JavaScript library and interoperate with hand-written JS. Version 2 adds async functions and JSX among other modern features, with a documented upgrade path from 1.x.
The Node-based CLI compiles files to .js, watches for changes, maps source, pipes through Babel with --transpile, and supports literate CoffeeScript. The core compiler also runs in browsers and other JavaScript environments without Node. Developers install globally for the coffee utility or locally per project so versions stay pinned with dependencies.
Runtime compatibility depends on target Node or browser capabilities for emitted features such as JSX, async generators, and modules; transpilation remains an option when targets lack native support. Integration notes cover frameworks and tooling that consume CoffeeScript output.
Key features
- One-to-one JavaScript compilation
- Concise function and class syntax
- Array comprehensions
- Async functions and JSX
- CLI compile watch and REPL
- Source map generation
- Optional Babel transpilation
- Browser-capable compiler core
Use cases
- Shorter JavaScript authoring
- Legacy CoffeeScript codebases
- Script compile to .js artifacts
- Literate programming workflows
- Node utility scripting