npm-remote-ls
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -35,3 +35,3 @@ #!/usr/bin/env node | ||
require('../lib/config')({ | ||
require('../lib').config({ | ||
verbose: yargs.argv.verbose, | ||
@@ -41,8 +41,5 @@ development: yargs.argv.development | ||
var name = yargs.argv.name || yargs.argv._[0], | ||
var name = yargs.argv.name || yargs.argv._[0] || '', | ||
version = name.split('@')[1] || yargs.argv.version; | ||
// remove version string from name. | ||
name = name.split('@')[0]; | ||
if (yargs.argv.help || !name) { | ||
@@ -52,3 +49,3 @@ console.log(yargs.help()); | ||
spinner(); | ||
ls(name, version, yargs.argv.flatten, function(obj) { | ||
ls(name.split('@')[0], version, yargs.argv.flatten, function(obj) { | ||
if (Array.isArray(obj)) console.log(obj); | ||
@@ -55,0 +52,0 @@ else console.log(treeify.asTree(obj)); |
exports.RemoteLS = require('./remote-ls'); | ||
exports.config = function(opts) { | ||
return require('./config')(opts); | ||
}; | ||
exports.ls = function(name, version, flatten, cb) { | ||
@@ -4,0 +8,0 @@ var ls = new exports.RemoteLS(); |
{ | ||
"name": "npm-remote-ls", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Examine a package's dependency graph before you install it", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
40853
417