function listInstalled(folder) {
    var options = {
        dev: false,
        log: function() {},
        depth: 4
    };
    var results = [];

    function onPackage(pkg, isRoot) {
        if (!validateId(pkg.name)){
            if (!isRoot) return;
        } else {
            results.push({
                name: pluginId(pkg.name),
                version: pkg.version,
                path: pkg.realPath,
                depth: pkg.depth
            });
        }

        _.each(pkg.dependencies, function(dep) {
            onPackage(dep);
        });
    }

    return Promise.nfcall(readInstalled, folder, options)
    .then(function(data) {
        onPackage(data, true);
        return _.uniq(results, 'name');
    });
}
// Returns an ordered list of plugins
Returns an ordered list of plugins
Returns an ordered list of plugins
function listInstalled(folder) {
    var options = {
        dev: false,
        log: function() {},
        depth: 4
    };
    var results = [];
    function onPackage(pkg, isRoot) {
        if (!validateId(pkg.name)){
            if (!isRoot) return;
        } else {
            results.push({
                name: pluginId(pkg.name),
                version: pkg.version,
                path: pkg.realPath,
                depth: pkg.depth
            });
        }
        _.each(pkg.dependencies, function(dep) {
            onPackage(dep);
        });
    }
    return Promise.nfcall(readInstalled, folder, options)
    .then(function(data) {
        onPackage(data, true);
        return _.uniq(results, 'name');
    });
}
function listInstalled ( folder ) { var options = { dev : false , log : function ( ) { } , depth : 4 } ; var results = [ ] ; function onPackage ( pkg , isRoot ) { if ( ! validateId ( pkg . name ) ) { if ( ! isRoot ) return ; } else { results . push ( { name : pluginId ( pkg . name ) , version : pkg . version , path : pkg . realPath , depth : pkg . depth } ) ; } _ . each ( pkg . dependencies , function ( dep ) { onPackage ( dep ) ; } ) ; } return Promise . nfcall ( readInstalled , folder , options ) . then ( function ( data ) { onPackage ( data , true ) ; return _ . uniq ( results , 'name' ) ; } ) ; }
Returns an ordered list of plugins
Returns an ordered list of plugins