beginnings of a build script

This commit is contained in:
Jeremy Ashkenas
2010-02-16 01:04:48 -05:00
parent fa63288f52
commit 2f389f1d51
6 changed files with 47 additions and 20 deletions

View File

@@ -15,6 +15,7 @@
option_parser = null;
// The CommandLine handles all of the functionality of the `coffee` utility.
exports.run = function run() {
var flags, separator;
parse_options();
if (options.interactive) {
return require('./repl');
@@ -25,6 +26,13 @@
if (!(sources.length)) {
usage();
}
separator = sources.indexOf('--');
flags = [];
if (separator >= 0) {
flags = sources.slice((separator + 1), sources.length);
sources = sources.slice(0, separator);
}
process.ARGV = flags;
compile_scripts();
return this;
};