Fixed: replace absolute with relative require, remove unsupported --trackComments from usage.

Unless I'm missing something, the simple relative path "../acorn.js" is exactly equivalent to the absolute path being constructed in the old code.
This commit is contained in:
Aparajita Fishman
2013-09-03 11:39:49 -04:00
committed by Marijn Haverbeke
parent c152be4a2e
commit cfbbeebe8b

View File

@@ -2,13 +2,13 @@
var path = require('path');
var fs = require('fs');
var acorn = require(path.join(path.dirname(fs.realpathSync(__filename)), "../acorn.js"));
var acorn = require('../acorn.js');
var infile, parsed, options = {}, silent = false, compact = false;
function help(status) {
console.log("usage: " + path.basename(process.argv[1]) + " infile [--ecma3|--ecma5] [--strictSemicolons]");
console.log(" [--trackComments] [--locations] [--compact] [--silent] [--help]");
console.log(" [--locations] [--compact] [--silent] [--help]");
process.exit(status);
}