loadPluginData(cb)
    {
        // load all the descriptors for all the plugins
        async.map(this.plugins, (name, next) =>
        {
            const pluginPath = path.join(__dirname, '..', 'plugins', name);

            fs.readFile(path.join(pluginPath, 'package.json'), (err, data) =>
            {
                // TODO: Pull plugin from NPM instead of just failing.
                if (err) return next(err);

                try
                {
                    return next(null, {
                        name,
                        pkg: JSON.parse(data),
                        path: pluginPath,
                        local: true,
                    });
                }
                catch (e)
                {
                    return next(e);
                }
            });
        }, cb);
    }
/**
     * Loads the package data about plugins.
     *
     * @param {function} cb - Callback to call when complete.
     */
Loads the package data about plugins.
@param {function} cb - Callback to call when complete.
Loads the package data about plugins . @param { function } cb - Callback to call when complete .
loadPluginData(cb)
    {
        async.map(this.plugins, (name, next) =>
        {
            const pluginPath = path.join(__dirname, '..', 'plugins', name);
            fs.readFile(path.join(pluginPath, 'package.json'), (err, data) =>
            {
                if (err) return next(err);
                try
                {
                    return next(null, {
                        name,
                        pkg: JSON.parse(data),
                        path: pluginPath,
                        local: true,
                    });
                }
                catch (e)
                {
                    return next(e);
                }
            });
        }, cb);
    }
loadPluginData ( cb ) { async . map ( this . plugins , ( name , next ) => { const pluginPath = path . join ( __dirname , '..' , 'plugins' , name ) ; fs . readFile ( path . join ( pluginPath , 'package.json' ) , ( err , data ) => { if ( err ) return next ( err ) ; try { return next ( null , { name , pkg : JSON . parse ( data ) , path : pluginPath , local : true , } ) ; } catch ( e ) { return next ( e ) ; } } ) ; } , cb ) ; }
Loads the package data about plugins.
Loads the package data about plugins .
// load all the descriptors for all the plugins // TODO: Pull plugin from NPM instead of just failing.