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
19 lines
676 B
JavaScript
19 lines
676 B
JavaScript
(function(){
|
|
var coffeescript, factories, loader;
|
|
// This (javascript) file is generated from lib/coffee_script/narwhal/loader.coffee
|
|
coffeescript = null;
|
|
factories = {
|
|
};
|
|
loader = {
|
|
// Reload the coffee-script environment from source.
|
|
reload: function(topId, path) {
|
|
coffeescript = coffeescript || require('./coffee-script');
|
|
return (factories[topId] = coffeescript.makeNarwhalFactory(path));
|
|
},
|
|
// Ensure that the coffee-script environment is loaded.
|
|
load: function(topId, path) {
|
|
return factories[topId] = factories[topId] || this.reload(topId, path);
|
|
}
|
|
};
|
|
require.loader.loaders.unshift([".coffee", loader]);
|
|
})(); |