mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
coffee compiles CoffeeScript source files into JavaScript.
Usage:
coffee path/to/script.coffee
-i, --interactive run a CoffeeScript REPL (requires Narwhal)
-r, --run compile and run a script (requires Narwhal)
-o, --output [DIR] set the directory for compiled JavaScript
-w, --watch watch scripts for changes, and recompile
-p, --print print the compiled JavaScript to stdout
-l, --lint pipe the compiled JavaScript through JSLint
-e, --eval compile a cli scriptlet or read from stdin
-t, --tokens print the tokens that the lexer produces
-v, --verbose print at every step of code generation
-n, --no-wrap raw output, no safety wrapper or vars
--install-bundle install the CoffeeScript TextMate bundle
--version display CoffeeScript version
-h, --help display this help message outside of the coffee-script directory
20 lines
505 B
CoffeeScript
20 lines
505 B
CoffeeScript
# This (javascript) file is generated from lib/coffee_script/narwhal/loader.coffee
|
|
|
|
coffeescript: null
|
|
factories: {}
|
|
|
|
loader: {
|
|
|
|
# Reload the coffee-script environment from source.
|
|
reload: topId, path =>
|
|
coffeescript ||= require('./coffee-script')
|
|
factories[topId]: coffeescript.makeNarwhalFactory(path).
|
|
|
|
# Ensure that the coffee-script environment is loaded.
|
|
load: topId, path =>
|
|
factories[topId] ||= this.reload(topId, path).
|
|
|
|
}
|
|
|
|
require.loader.loaders.unshift([".coffee", loader])
|