Skip to content

Commit

Permalink
Rename optparse to nopt
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Mar 30, 2011
1 parent 9aa65ea commit 63367db
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
[submodule "node_modules/abbrev"]
path = node_modules/abbrev
url = git://github.com/isaacs/abbrev-js.git
[submodule "node_modules/optparse"]
path = node_modules/optparse
url = git://github.com/isaacs/node-optparse.git
[submodule "node_modules/nopt"]
path = node_modules/nopt
url = git://github.com/isaacs/nopt.git
4 changes: 2 additions & 2 deletions bin/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ var fs = require("../lib/utils/graceful-fs")
, configDefs = require("../lib/utils/config-defs")
, shorthands = configDefs.shorthands
, types = configDefs.types
, optparse = require("optparse")
, nopt = require("nopt")

log.verbose(process.argv, "cli")

var conf = optparse(types, shorthands)
var conf = nopt(types, shorthands)
npm.argv = conf.argv.remain
if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift()
else conf.usage = true
Expand Down
4 changes: 2 additions & 2 deletions lib/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var output = require("./utils/output")
, configDefs = require("./utils/config-defs")
, configTypes = configDefs.types
, shorthands = configDefs.shorthands
, optparse = require("optparse")
, nopt = require("nopt")
, configNames = Object.keys(configTypes).filter(function (e) {
return e.charAt(0) !== "_"
})
Expand Down Expand Up @@ -116,7 +116,7 @@ function completion (args, cb) {
// don't have to worry about the last arg being implicitly
// boolean'ed, since the last block will catch that.
var parsed = opts.conf =
optparse(configTypes, shorthands, partialWords.slice(0, -1), 0)
nopt(configTypes, shorthands, partialWords.slice(0, -1), 0)
// check if there's a command already.
console.error(parsed)
var cmd = parsed.argv.remain[1]
Expand Down
1 change: 1 addition & 0 deletions node_modules/nopt
Submodule nopt added at c25804
1 change: 0 additions & 1 deletion node_modules/optparse
Submodule optparse deleted from c20aee
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
}
, "main" : "npm"
, "bin" : "./bin/npm.js"
, "dependencies" : { "semver" : "1", "abbrev" : "1", "optparse" : "1" }
, "bundleDependencies" : [ "semver", "abbrev", "optparse" ]
, "dependencies" : { "semver" : "1", "abbrev" : "1", "nopt" : "1" }
, "bundleDependencies" : [ "semver", "abbrev", "nopt" ]
, "devDependencies" : { "ronn" : "" }
, "engines" : { "node" : "0.4 || 0.5", "npm" : "1" }
, "scripts" : { "test" : "make test"
Expand Down

0 comments on commit 63367db

Please sign in to comment.