Beispiel #1
0
 .action(function() {
     var tentaclePaths = options.get('tentacles') || [];
     var tentacleNames = tentaclePaths.map(function(tentaclePath) {
         return path.basename(tentaclePath);
     });
     console.log(tentacleNames.join('  '));
 });
Beispiel #2
0
 .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);
 });
Beispiel #3
0
 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);
 });
Beispiel #4
0
 .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);
     });
 });