fixing paths for running

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
This commit is contained in:
Jeremy Ashkenas
2009-12-27 12:43:05 -08:00
parent 55e736cb27
commit 7ae8687a3e
7 changed files with 24 additions and 13 deletions

View File

@@ -7,9 +7,8 @@
loader = {
// Reload the coffee-script environment from source.
reload: function(topId, path) {
coffeescript = coffeescript || require('coffee-script');
factories[topId] = coffeescript.makeNarwhalFactory(path);
return factories[topId];
coffeescript = coffeescript || require('./coffee-script');
return (factories[topId] = coffeescript.makeNarwhalFactory(path));
},
// Ensure that the coffee-script environment is loaded.
load: function(topId, path) {