function sortDependencies(plugins) {
    var byTypes = plugins.groupBy(pluginType);

    return byTypes.get(TYPE_PLUGIN, Immutable.List())
        .concat(byTypes.get(TYPE_THEME, Immutable.List()));
}
function sortDependencies(plugins) {
    var byTypes = plugins.groupBy(pluginType);

    return byTypes.get(TYPE_PLUGIN, Immutable.List())
        .concat(byTypes.get(TYPE_THEME, Immutable.List()));
}
function sortDependencies ( plugins ) { var byTypes = plugins . groupBy ( pluginType ) ; return byTypes . get ( TYPE_PLUGIN , Immutable . List ( ) ) . concat ( byTypes . get ( TYPE_THEME , Immutable . List ( ) ) ) ; }
Sort the list of dependencies to match list in book.json
The themes should always be loaded after the plugins

@param {List<PluginDependency>} deps
@return {List<PluginDependency>}
Sort the list of dependencies to match list in book . json The themes should always be loaded after the plugins
Sort dependencies by pluginType and theme