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/bin
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-07 01:48:24 +0400
committerisaacs <i@izs.me>2012-06-07 01:56:35 +0400
commit2568e40a395b809fb34125b3383f9f2616004f73 (patch)
treeb770c89d4ed5a46341bf3b42e563a7fbf110af32 /bin
parentd4b2d1149a0f2b56467ebeebd36e21d3a2bfe48a (diff)
Replace the log util with npmlog module
This feels so good. lib/utils/log.js is the worst kind of glue code that keeps the npm project from being properly abstracted into independent pieces. In the process, also cleaned up a lot of unproductive logging, and made the npm-debug.log generated on errors be a bit more easy to read.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/npm-cli.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index f29437093..a71985b37 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -15,9 +15,9 @@ if (typeof WScript !== "undefined") {
process.title = "npm"
-var log = require("../lib/utils/log.js")
-log.waitForConfig()
-log.info("ok", "it worked if it ends with")
+var log = require("npmlog")
+log.pause() // will be unpaused when config is loaded.
+log.info("it worked if it ends with", "ok")
var fs = require("graceful-fs")
, path = require("path")
@@ -36,7 +36,7 @@ if (path.basename(process.argv[1]).slice(-1) === "g") {
process.argv.splice(1, 1, "npm", "-g")
}
-log.verbose(process.argv, "cli")
+log.verbose("cli", process.argv)
var conf = nopt(types, shorthands)
npm.argv = conf.argv.remain
@@ -56,8 +56,8 @@ if (conf.versions) {
return
}
-log.info("npm@"+npm.version, "using")
-log.info("node@"+process.version, "using")
+log.info("using", "npm@%s", npm.version)
+log.info("using", "node@%s", process.version)
// make sure that this version of node works with this version of npm.
var semver = require("semver")