diff options
author | isaacs <i@izs.me> | 2010-02-18 03:27:50 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-02-18 03:28:40 +0300 |
commit | a5ef5db11e1845580c443134c3c76eb16022f972 (patch) | |
tree | 7f476c4b8376af119f7ae45050405a6fe49dfbe1 /cli.js | |
parent | a5a11087e82109bd4841f3b1c749b9e685550759 (diff) |
Move the command list to the top to make it easier to add to.
Diffstat (limited to 'cli.js')
-rwxr-xr-x | cli.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6,6 +6,9 @@ // only run as main module. if (module.id !== ".") return; +// supported commands. +var commands = ["help", "install"]; + var npm = require("./npm"), sys = require("sys"), path = require("path"), @@ -18,7 +21,6 @@ function p (m) { sys.error("NPM: "+m); return p }; log("cli: "+sys.inspect(process.argv)); -var commands = ["help", "install"]; npm.help = (function (h) { return function () { h && h.apply(npm, arguments); usage(); |