-
-
Save Gozala/4021511 to your computer and use it in GitHub Desktop.
npm testcase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npm = require("npm") | |
var path = require("path") | |
npm.load({ prefix: path.join(process.env.HOME, ".orchestrator") }, function(e, npm) { | |
npm.commands.ls([], function(err, _) { | |
// this time it's nothing but probably results are cached | |
npm.commands.install(["method"], function(err, _) { | |
// now there is something but it still thinks there is nothing. | |
npm.commands.ls([], console.log) | |
}) | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> /Users/gozala/.orchestrator | |
└── (empty) | |
npm http GET https://registry.npmjs.org/method | |
npm http 304 https://registry.npmjs.org/method | |
[email protected] ../../.orchestrator/node_modules/method | |
/Users/gozala/.orchestrator | |
└── (empty) | |
null { dependencies: {}, | |
path: '/Users/gozala/.orchestrator', | |
realName: undefined, | |
realPath: '/Users/gozala/.orchestrator', | |
link: undefined, | |
depth: 0 } {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment