function sortByPlugin(priorityPlugin) {
    return function (pluginCurrent, pluginNext) {
      if (pluginCurrent === priorityPlugin) {
        // pluginCurrent comes before plugin next
        return -1;
      } else if (pluginNext === priorityPlugin) {
        // pluginNext comes before pluginCurrent
        return 1;
      }

      // Do no swap
      return 0;
    }
  }
Sorts a plugin list by a specified plugin name

@param  {String} priorityPlugin The plugin name to be given priority
@return {Function}              Sorting function for the given plugin name