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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-07-17 00:28:37 +0400
committerisaacs <i@izs.me>2012-07-17 00:28:37 +0400
commit1977584a975db9fbc2cd36b34ea2e4743f465dd4 (patch)
tree7918d085aeabdf2cd4416277b2ed626d9ca1485b /lib/help.js
parent4431b14b1eedfa4fd03edc6e2c8388096ee859e7 (diff)
Replace lib/utils/output.js with console.log
Diffstat (limited to 'lib/help.js')
-rw-r--r--lib/help.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/help.js b/lib/help.js
index 998d90471..495db8381 100644
--- a/lib/help.js
+++ b/lib/help.js
@@ -12,7 +12,6 @@ var fs = require("graceful-fs")
, path = require("path")
, exec = require("./utils/exec.js")
, npm = require("./npm.js")
- , output = require("./utils/output.js")
, log = require("npmlog")
function help (args, cb) {
@@ -35,7 +34,8 @@ function help (args, cb) {
) {
npm.config.set("loglevel", "silent")
log.level = "silent"
- return output.write(npm.commands[section].usage, cb)
+ console.log(npm.commands[section].usage)
+ return cb()
}
var sectionPath = path.join( __dirname, "..", "man", "man" + num
@@ -67,7 +67,8 @@ function help (args, cb) {
if (!b) {
return cb(new Error("viewer=browser and no browser set."))
}
- output.write("Opening HTML in default browser...", cb)
+ console.log("Opening HTML in default browser...")
+ process.nextTick(cb)
// windows is SO weird.
if (process.platform === "win32") {
exec("cmd", ["/c", htmlPath], env, false, function () {})
@@ -85,7 +86,7 @@ function help (args, cb) {
if (er) return cb(er)
npm.config.set("loglevel", "silent")
log.level = "silent"
- output.write
+ console.log
( ["\nUsage: npm <command>"
, ""
, "where <command> is one of:"
@@ -104,7 +105,8 @@ function help (args, cb) {
, "Config info can be viewed via: npm help config"
, ""
, "npm@" + npm.version + " " + path.dirname(__dirname)
- ].join("\n"), function () { cb(er) })
+ ].join("\n"))
+ cb(er)
})
}