Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cli.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-02-18 03:27:50 +0300
committerisaacs <i@izs.me>2010-02-18 03:28:40 +0300
commita5ef5db11e1845580c443134c3c76eb16022f972 (patch)
tree7f476c4b8376af119f7ae45050405a6fe49dfbe1 /cli.js
parenta5a11087e82109bd4841f3b1c749b9e685550759 (diff)
Move the command list to the top to make it easier to add to.
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli.js b/cli.js
index d5699144d..90770abc9 100755
--- a/cli.js
+++ b/cli.js
@@ -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();