mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 11:01:25 -05:00
display the usage message when called without arguments
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
// The CommandLine handles all of the functionality of the `coffee` utility.
|
||||
exports.run = function run() {
|
||||
this.parse_options();
|
||||
if (!(this.sources.length)) {
|
||||
this.usage();
|
||||
}
|
||||
this.compile_scripts();
|
||||
return this;
|
||||
};
|
||||
@@ -113,6 +116,7 @@
|
||||
var oparser, opts, paths;
|
||||
opts = (this.options = {});
|
||||
oparser = (this.option_parser = new optparse.OptionParser(SWITCHES));
|
||||
oparser.banner = BANNER;
|
||||
oparser.add = oparser['on'];
|
||||
oparser.add('interactive', function() {
|
||||
return opts.interactive = true;
|
||||
|
||||
Reference in New Issue
Block a user