Home Reference Source
import {RollupPluginSettingsConfiguration} from 'projext-plugin-rollup/src/services/configurations/pluginsConfiguration.js'
public class | source

RollupPluginSettingsConfiguration

Extends:

ConfigurationFile → RollupPluginSettingsConfiguration

This service creates a configuration with all the settings for the plugins this build engine uses.

Constructor Summary

Public Constructor
public

constructor(appLogger: Logger, babelConfiguration: BabelConfiguration, babelHelper: BabelHelper, events: Events, packageInfo: Object, pathUtils: PathUtils, rollupPluginInfo: Object, targetsHTML: TargetsHTML)

Member Summary

Public Members
public

A local reference for the appLogger service.

public

A local reference for the babelConfiguration service.

public

babelHelper: BabelHelper

A local reference for the babelHelper service.

public

A local reference for the events service.

public

The project package.json information.

public

A local reference for the plugin information.

public

A local reference for the targetsHTML service.

Method Summary

Public Methods
public

Creates the plugins settings for the required target.

Inherited Summary

From class ConfigurationFile
public

Whether the configuration should be created every time getConfig gets called or not.

public

A list of paths that can overwrite the configuration.

public

A parent configuration to extend.

public

A local reference for the pathUtils service.

public abstract

This method will be called the first time getConfig gets called (or every time, depending on the value of the asFactory property) and it should return the configuration contents.

public

This is the public method all other services uses to obtain the configuration.

Public Constructors

public constructor(appLogger: Logger, babelConfiguration: BabelConfiguration, babelHelper: BabelHelper, events: Events, packageInfo: Object, pathUtils: PathUtils, rollupPluginInfo: Object, targetsHTML: TargetsHTML) source

Class constructor.

Override:

ConfigurationFile#constructor

Params:

NameTypeAttributeDescription
appLogger Logger

To send to the plugins that support a logger.

babelConfiguration BabelConfiguration

To get the target Babel configuration.

babelHelper BabelHelper

To disable the modules setting of the Babel env preset for a target, as Rollup requires.

events Events

To reduce the settings.

packageInfo Object

To get the dependencies and define them as externals for Node targets.

pathUtils PathUtils

Require by ConfigurationFile in order to build the path to the overwrite file. It's also used to build the paths of SSL certificates the dev server plugin may use.

rollupPluginInfo Object

To get the name of the "sub packages" the plugin provides and that should be marked as external.

targetsHTML TargetsHTML

To get the path to a target HTML template file.

Public Members

public appLogger: Logger source

A local reference for the appLogger service.

public babelConfiguration: BabelConfiguration source

A local reference for the babelConfiguration service.

public babelHelper: BabelHelper source

A local reference for the babelHelper service.

public events: Events source

A local reference for the events service.

public packageInfo: Object source

The project package.json information.

public rollupPluginInfo: RollupPluginInfo source

A local reference for the plugin information.

public targetsHTML: TargetsHTML source

A local reference for the targetsHTML service.

Public Methods

public createConfig(params: RollupConfigurationParams, stats: Function): Object source

Creates the plugins settings for the required target. This method uses the reducer events rollup-plugin-settings-configuration-for-node or rollup-plugin-settings-configuration-for-browser, depending on the target type, and then rollup-plugin-settings-configuration. The event receives the configuration object, the params and it expects an updated configuration object on return.

Override:

ConfigurationFile#createConfig

Params:

NameTypeAttributeDescription
params RollupConfigurationParams

A dictionary generated by the top service building the configuration and that includes things like the target information, its entry settings, output paths, etc.

stats Function

A function to send to the plugins that support logging stats entries.

Return:

Object