example/dist/csssystem/styleguide/cmod_styleguide.js
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
  ("production" !== "development" ? invariant(
    !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName),
    'EventPluginHub: More than one plugin attempted to publish the same ' +
    'event name, `%s`.',
    eventName
  ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)));
  EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;

  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  if (phasedRegistrationNames) {
    for (var phaseName in phasedRegistrationNames) {
      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
        var phasedRegistrationName = phasedRegistrationNames[phaseName];
        publishRegistrationName(
          phasedRegistrationName,
          PluginModule,
          eventName
        );
      }
    }
    return true;
  } else if (dispatchConfig.registrationName) {
    publishRegistrationName(
      dispatchConfig.registrationName,
      PluginModule,
      eventName
    );
    return true;
  }
  return false;
}
function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
  ("production" !== "development" ? invariant(
    !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName),
    'EventPluginHub: More than one plugin attempted to publish the same ' +
    'event name, `%s`.',
    eventName
  ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)));
  EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;

  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  if (phasedRegistrationNames) {
    for (var phaseName in phasedRegistrationNames) {
      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
        var phasedRegistrationName = phasedRegistrationNames[phaseName];
        publishRegistrationName(
          phasedRegistrationName,
          PluginModule,
          eventName
        );
      }
    }
    return true;
  } else if (dispatchConfig.registrationName) {
    publishRegistrationName(
      dispatchConfig.registrationName,
      PluginModule,
      eventName
    );
    return true;
  }
  return false;
}
function publishEventForPlugin ( dispatchConfig , PluginModule , eventName ) { ( "production" !== "development" ? invariant ( ! EventPluginRegistry . eventNameDispatchConfigs . hasOwnProperty ( eventName ) , 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.' , eventName ) : invariant ( ! EventPluginRegistry . eventNameDispatchConfigs . hasOwnProperty ( eventName ) ) ) ; EventPluginRegistry . eventNameDispatchConfigs [ eventName ] = dispatchConfig ; var phasedRegistrationNames = dispatchConfig . phasedRegistrationNames ; if ( phasedRegistrationNames ) { for ( var phaseName in phasedRegistrationNames ) { if ( phasedRegistrationNames . hasOwnProperty ( phaseName ) ) { var phasedRegistrationName = phasedRegistrationNames [ phaseName ] ; publishRegistrationName ( phasedRegistrationName , PluginModule , eventName ) ; } } return true ; } else if ( dispatchConfig . registrationName ) { publishRegistrationName ( dispatchConfig . registrationName , PluginModule , eventName ) ; return true ; } return false ; }
Publishes an event so that it can be dispatched by the supplied plugin.

@param {object} dispatchConfig Dispatch configuration for the event.
@param {object} PluginModule Plugin publishing the event.
@return {boolean} True if the event was successfully published.
@private
Publishes an event so that it can be dispatched by the supplied plugin .