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/npm.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-03-11 00:40:57 +0300
committerisaacs <i@izs.me>2010-03-11 00:40:57 +0300
commit4bc33dff819eb0792ee276f63c9c034df8d0c5c0 (patch)
tree808871b8ff569ae2a1d1188e8405ac1ff7ed07c0 /npm.js
parentba76c7928a50031fee913b058e276819515c111d (diff)
Expose publish command.
Diffstat (limited to 'npm.js')
-rwxr-xr-xnpm.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/npm.js b/npm.js
index 667d92a28..24068c349 100755
--- a/npm.js
+++ b/npm.js
@@ -13,6 +13,18 @@ var npm = exports,
npm.moduleName = moduleName;
+npm.config = {};
+
+// TODO: read configs from a conf file or cli
+// defaulting here is a wee bit hackish and potentially unsafe.
+// better to require that it be set in the conf or cli, and
+// fail if it's not set.
+
+// TODO: point this at a public js-registry instance some time soon.
+// This works right now by setting an /etc/hosts entry pointing
+// the "packages" hostname to a running instance of the js-registry
+npm.config.registry = "http://packages:5984/";
+
[ "install"
, "activate"
, "deactivate"
@@ -20,6 +32,7 @@ npm.moduleName = moduleName;
, "ls"
, "build"
, "link"
+, "publish"
].forEach(function (c) {
npm[c] = require("./lib/"+c);
});