lib/cli-engine.js
function loadPlugins(pluginNames) {
  if (pluginNames) {
    pluginNames.forEach(function(pluginName) {
      var pluginNamespace = util.getNamespace(pluginName),
        pluginNameWithoutNamespace = util.removeNameSpace(pluginName),
        pluginNameWithoutPrefix = util.removePluginPrefix(pluginNameWithoutNamespace),
        plugin;

      if (!loadedPlugins[pluginNameWithoutPrefix]) {

        plugin = require(pluginNamespace + util.PLUGIN_NAME_PREFIX + pluginNameWithoutPrefix);
        // if this plugin has rules, import them
        if (plugin.rules) {
          rules.import(plugin.rules, pluginNameWithoutPrefix);
        }

        loadedPlugins[pluginNameWithoutPrefix] = plugin;
      }
    });
  }
}
function loadPlugins(pluginNames) {
  if (pluginNames) {
    pluginNames.forEach(function(pluginName) {
      var pluginNamespace = util.getNamespace(pluginName),
        pluginNameWithoutNamespace = util.removeNameSpace(pluginName),
        pluginNameWithoutPrefix = util.removePluginPrefix(pluginNameWithoutNamespace),
        plugin;

      if (!loadedPlugins[pluginNameWithoutPrefix]) {

        plugin = require(pluginNamespace + util.PLUGIN_NAME_PREFIX + pluginNameWithoutPrefix);
        // if this plugin has rules, import them
        if (plugin.rules) {
          rules.import(plugin.rules, pluginNameWithoutPrefix);
        }

        loadedPlugins[pluginNameWithoutPrefix] = plugin;
      }
    });
  }
}
function loadPlugins ( pluginNames ) { if ( pluginNames ) { pluginNames . forEach ( function ( pluginName ) { var pluginNamespace = util . getNamespace ( pluginName ) , pluginNameWithoutNamespace = util . removeNameSpace ( pluginName ) , pluginNameWithoutPrefix = util . removePluginPrefix ( pluginNameWithoutNamespace ) , plugin ; if ( ! loadedPlugins [ pluginNameWithoutPrefix ] ) { plugin = require ( pluginNamespace + util . PLUGIN_NAME_PREFIX + pluginNameWithoutPrefix ) ; // if this plugin has rules, import them if ( plugin . rules ) { rules . import ( plugin . rules , pluginNameWithoutPrefix ) ; } loadedPlugins [ pluginNameWithoutPrefix ] = plugin ; } } ) ; } }
Load the given plugins if they are not loaded already.
@param {string[]} pluginNames An array of plugin names which should be loaded.
@returns {void}
Load the given plugins if they are not loaded already .