function listPlugins(book) {
    return Promise.all([
        listInstalled(path.resolve(__dirname, '../..')),
        listInstalled(book.root),
        book.originalRoot? listInstalled(book.originalRoot) : Promise([]),
        book.isLanguageBook()? listInstalled(book.parent.root) : Promise([])
    ])
    .spread(function() {
        var args = _.toArray(arguments);

        var results = _.reduce(args, function(out, a) {
            return out.concat(a);
        }, []);

        return _.uniq(results, 'name');
    });
}
// List installed plugins for a book (defaults and installed)
List installed plugins for a book (defaults and installed)
List installed plugins for a book ( defaults and installed )
function listPlugins(book) {
    return Promise.all([
        listInstalled(path.resolve(__dirname, '../..')),
        listInstalled(book.root),
        book.originalRoot? listInstalled(book.originalRoot) : Promise([]),
        book.isLanguageBook()? listInstalled(book.parent.root) : Promise([])
    ])
    .spread(function() {
        var args = _.toArray(arguments);
        var results = _.reduce(args, function(out, a) {
            return out.concat(a);
        }, []);
        return _.uniq(results, 'name');
    });
}
function listPlugins ( book ) { return Promise . all ( [ listInstalled ( path . resolve ( __dirname , '../..' ) ) , listInstalled ( book . root ) , book . originalRoot ? listInstalled ( book . originalRoot ) : Promise ( [ ] ) , book . isLanguageBook ( ) ? listInstalled ( book . parent . root ) : Promise ( [ ] ) ] ) . spread ( function ( ) { var args = _ . toArray ( arguments ) ; var results = _ . reduce ( args , function ( out , a ) { return out . concat ( a ) ; } , [ ] ) ; return _ . uniq ( results , 'name' ) ; } ) ; }
List installed plugins for a book (defaults and installed)
List installed plugins for a book ( defaults and installed )