lib/installer.js
function listPlugins(callback) {
  callback = utils.defineCallback(callback);
  return fs.readdir(pluginsDir, function(readdirErr, files) {
    if (readdirErr) {
      return callback(new errors.PluginsListingError(readdirErr));
    }
    var fullpath, pkg;
    var descriptors = [ ];
    files.forEach(function (file) {
      fullpath = path.join(pluginsDir, file, "package.json");
      try {
        pkg = require(fullpath);
        descriptors.push({
          name: pkg.name,
          version: pkg.version || "",
          description: pkg.description || "",
          author: pkg.author || "",
          icon: pkg.icon || "",
          homepage: pkg.homepage || "",
        });
    } catch (requireErr) {
        /*
        * we shall ignore this error and only list those plugins
        * we can load
        */
      }
    });
    return callback(null, descriptors);
  });
}
function listPlugins(callback) {
  callback = utils.defineCallback(callback);
  return fs.readdir(pluginsDir, function(readdirErr, files) {
    if (readdirErr) {
      return callback(new errors.PluginsListingError(readdirErr));
    }
    var fullpath, pkg;
    var descriptors = [ ];
    files.forEach(function (file) {
      fullpath = path.join(pluginsDir, file, "package.json");
      try {
        pkg = require(fullpath);
        descriptors.push({
          name: pkg.name,
          version: pkg.version || "",
          description: pkg.description || "",
          author: pkg.author || "",
          icon: pkg.icon || "",
          homepage: pkg.homepage || "",
        });
    } catch (requireErr) {
        /*
        * we shall ignore this error and only list those plugins
        * we can load
        */
      }
    });
    return callback(null, descriptors);
  });
}
function listPlugins ( callback ) { callback = utils . defineCallback ( callback ) ; return fs . readdir ( pluginsDir , function ( readdirErr , files ) { if ( readdirErr ) { return callback ( new errors . PluginsListingError ( readdirErr ) ) ; } var fullpath , pkg ; var descriptors = [ ] ; files . forEach ( function ( file ) { fullpath = path . join ( pluginsDir , file , "package.json" ) ; try { pkg = require ( fullpath ) ; descriptors . push ( { name : pkg . name , version : pkg . version || "" , description : pkg . description || "" , author : pkg . author || "" , icon : pkg . icon || "" , homepage : pkg . homepage || "" , } ) ; } catch ( requireErr ) { /*
        * we shall ignore this error and only list those plugins
        * we can load
        */ } } ) ; return callback ( null , descriptors ) ; } ) ; }
Listing installed plugins

@param {Function} [callback] - callback(err, descriptors)
Listing installed plugins