Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added help indicator for passing arguments to scripts run with `coffee`

  • Loading branch information...
commit 12d6461bbed0f5c6f2854b1c161cbf52e3365261 1 parent 28a1101
@michaelficarra michaelficarra authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/coffee-script/command.js
  2. +2 −2 src/command.coffee
View
2  lib/coffee-script/command.js
@@ -26,7 +26,7 @@
return process.stderr.write(line + '\n');
};
- BANNER = 'Usage: coffee [options] path/to/script.coffee\n\nIf called without options, `coffee` will run your script.';
+ BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.';
SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-r', '--require [FILE*]', 'require a library before executing your script'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
View
4 src/command.coffee
@@ -21,10 +21,10 @@ printWarn = (line) -> process.stderr.write line + '\n'
# The help banner that is printed when `coffee` is called without arguments.
BANNER = '''
- Usage: coffee [options] path/to/script.coffee
+ Usage: coffee [options] path/to/script.coffee -- [args]
If called without options, `coffee` will run your script.
- '''
+'''
# The list of all the valid option flags that `coffee` knows how to handle.
SWITCHES = [
Please sign in to comment.
Something went wrong with that request. Please try again.