import {RollupConfiguration} from 'projext-plugin-rollup/src/services/building/configuration.js'
RollupConfiguration
This service reads the targets information and generates what would be the contents of a Rollup configuration file for them.
Constructor Summary
Public Constructor | ||
public |
constructor(buildVersion: BuildVersion, targets: Targets, targetsFileRules: TargetsFileRules, targetConfiguration: TargetConfigurationCreator, rollupConfigurations: RollupConfigurations) Class constructor. |
Member Summary
Public Members | ||
public |
A local reference for the |
|
public |
A dictionary with the configurations for target type and build type. |
|
public |
A local reference for the |
|
public |
A local reference for the |
|
public |
A local reference for the |
Method Summary
Public Methods | ||
public |
This method generates a complete Rollup configuration for a target. |
Public Constructors
public constructor(buildVersion: BuildVersion, targets: Targets, targetsFileRules: TargetsFileRules, targetConfiguration: TargetConfigurationCreator, rollupConfigurations: RollupConfigurations) source
Class constructor.
Params:
Name | Type | Attribute | Description |
buildVersion | BuildVersion | To load the project version. |
|
targets | Targets | To get the target information. |
|
targetsFileRules | TargetsFileRules | To get the file rules of the target. |
|
targetConfiguration | TargetConfigurationCreator | To create an overwrite configuration for the target. |
|
rollupConfigurations | RollupConfigurations | A dictionary of configurations for target type and build type. |
Public Members
public rollupConfigurations: RollupConfigurations source
A dictionary with the configurations for target type and build type.
public targetConfiguration: TargetConfigurationCreator source
A local reference for the targetConfiguration
function service.
public targetsFileRules: TargetsFileRules source
A local reference for the targetsFileRules
service.
Public Methods
public getConfig(target: Target, buildType: string): Object source
This method generates a complete Rollup configuration for a target.
Before creating the configuration, it uses the reducer event
rollup-configuration-parameters-for-browser
or rollup-configuration-parameters-for-node
,
depending on the target type, and then rollup-configuration-parameters
to reduce
the parameters (RollupConfigurationParams) the services will use to generate the
configuration. The event recevies the parameters and expects updated parameters in return.
Throw:
If there's no base configuration for the target type. |
|
If there's no base configuration for the target type and build type. |
TODO:
- Stop using `events` from `targets` and inject it directly on the class.