.action(function() { var tentaclePaths = options.get('tentacles') || []; var tentacleNames = tentaclePaths.map(function(tentaclePath) { return path.basename(tentaclePath); }); console.log(tentacleNames.join(' ')); });
.action(function(tentacleName) { var fullTentacleName = 'oppi-' + tentacleName; var tentacles = options.get('tentacles') || []; var newTentacles = tentacles.filter(function(tentaclePath) { return (tentaclePath.indexOf(fullTentacleName) === -1); }); options.set('tentacles', newTentacles); var hits = tentacles.length - newTentacles.length; console.log('%s tentacles removed', hits); });
npmi(installOptions, function(err) { if (err) { throw err; } var tentacles = options.get('tentacles') || []; tentacles.push(path.join( installPath, 'node_modules', fullTentacleName )); options.set('tentacles', tentacles); });
.action(function(url) { var auth = options.get('auth'); if (auth) { return registerApi(auth, url, printError); } getCredentials(function(err, auth) { if (err) { return printError(err); } registerApi(auth, url, printError); }); });