Function
Static Public Summary | ||
public |
compression(options: ProjextRollupCompressionPluginOptions, name: string): ProjextRollupCompressionPlugin Shorthand method to create an instance of ProjextRollupCompressionPlugin. |
|
public |
copy(options: ProjextRollupCopyPluginOptions, name: string): ProjextRollupCopyPlugin Shorthand method to create an instance of ProjextRollupCopyPlugin. |
|
public |
css(options: ProjextRollupCSSPluginOptions, name: string): ProjextRollupCSSPlugin Shorthand method to create an instance of ProjextRollupCSSPlugin. |
|
public |
devServer(options: ProjextRollupDevServerPluginOptions, name: string): ProjextRollupDevServerPlugin Shorthand method to create an instance of ProjextRollupDevServerPlugin. |
|
public |
extraWatch(files: Array, name: string): Object This is a Rollup plugin that allows the building process to watch additional files that may not be included on the entry point in order to restart the process. |
|
public |
moduleReplace(options: *, name: *) |
|
public |
nodeRunner(options: ProjextRollupNodeRunnerPluginOptions, name: string): ProjextRollupNodeRunnerPlugin Shorthand method to create an instance of ProjextRollupNodeRunnerPlugin. |
|
public |
rollupFrontendFs(getDirectory: RollupMiddlewareGetDirectory, getFileSystem: RollupMiddlewareGetFileSystem): Provider Generate a |
|
public |
runtimeReplace(definitionsFn: Function():Object, name: string): ProjextRollupRuntimeReplacePlugin Shorthand method to create an instance of ProjextRollupRuntimeReplacePlugin |
|
public |
stats(options: ProjextRollupStatsPluginOptions, name: string): ProjextRollupStatsPlugin Shorthand method to create an instance of ProjextRollupStatsPlugin. |
|
public |
stylesheetAssets(options: ProjextRollupStylesheetAssetsPluginOptions, name: string): ProjextRollupStylesheetAssetsPlugin Shorthand method to create an instance of ProjextRollupStylesheetAssetsPlugin. |
|
public |
stylesheetAssetsHelper(options: ProjextRollupStylesheetAssetsHelperPluginOptions, name: string): ProjextRollupStylesheetAssetsHelperPlugin Shorthand method to create an instance of ProjextRollupStylesheetAssetsHelperPlugin. |
|
public |
stylesheetModulesFixer(options: ProjextRollupStylesheetModulesFixerPluginOptions, name: string): ProjextRollupStylesheetModulesFixerPlugin Shorthand method to create an instance of ProjextRollupStylesheetModulesFixerPlugin. |
|
public |
template(options: ProjextRollupTemplatePluginOptions, name: string): ProjextRollupTemplatePlugin Shorthand method to create an instance of ProjextRollupTemplatePlugin. |
|
public |
urls(options: ProjextRollupURLsPluginOptions, name: string): ProjextRollupURLsPlugin Shorthand method to create an instance of ProjextRollupURLsPlugin. |
|
public |
useExpress(expressApp: Express, targetToBuild: string, targetToServe: string): MiddlewareInformation Implements the Rollup middleware for a target on an Express app. |
|
public |
useJimpex(jimpexApp: Jimpex, targetToBuild: string, targetToServe: string): MiddlewareInformation Implements the Rollup middleware for a target on a Jimpex app. |
|
public |
Shorthand method to create an instance of ProjextRollupWindowAsGlobalPlugin. |
Static Public
public compression(options: ProjextRollupCompressionPluginOptions, name: string): ProjextRollupCompressionPlugin source
import {compression} from 'projext-plugin-rollup/src/plugins/compression/index.js'
Shorthand method to create an instance of ProjextRollupCompressionPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupCompressionPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public copy(options: ProjextRollupCopyPluginOptions, name: string): ProjextRollupCopyPlugin source
import {copy} from 'projext-plugin-rollup/src/plugins/copy/index.js'
Shorthand method to create an instance of ProjextRollupCopyPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupCopyPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public css(options: ProjextRollupCSSPluginOptions, name: string): ProjextRollupCSSPlugin source
import {css} from 'projext-plugin-rollup/src/plugins/css/index.js'
Shorthand method to create an instance of ProjextRollupCSSPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupCSSPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public devServer(options: ProjextRollupDevServerPluginOptions, name: string): ProjextRollupDevServerPlugin source
import {devServer} from 'projext-plugin-rollup/src/plugins/devServer/index.js'
Shorthand method to create an instance of ProjextRollupDevServerPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupDevServerPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public extraWatch(files: Array, name: string): Object source
import {extraWatch} from 'projext-plugin-rollup/src/plugins/extraWatch/index.js'
This is a Rollup plugin that allows the building process to watch additional files that may
not be included on the entry point in order to restart the process.
The reason this is not defined as a class it's because it needs access to .addWatchFile
,
which is only available on the execution context of the transform
hook.
Params:
Name | Type | Attribute | Description |
files | Array | The list of additional files to
watch and ONE CONNECTED TO THE
BUNDLE. The reason for that is
because the plugin uses the
|
|
name | string |
|
The name of the plugin's instance. |
Return:
Object | plugin |
Throw:
if |
public moduleReplace(options: *, name: *) source
import {moduleReplace} from 'projext-plugin-rollup/src/plugins/moduleReplace/index.js'
Params:
Name | Type | Attribute | Description |
options | * | ||
name | * |
public nodeRunner(options: ProjextRollupNodeRunnerPluginOptions, name: string): ProjextRollupNodeRunnerPlugin source
import {nodeRunner} from 'projext-plugin-rollup/src/plugins/nodeRunner/index.js'
Shorthand method to create an instance of ProjextRollupNodeRunnerPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupNodeRunnerPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public rollupFrontendFs(getDirectory: RollupMiddlewareGetDirectory, getFileSystem: RollupMiddlewareGetFileSystem): Provider source
import {rollupFrontendFs} from 'projext-plugin-rollup/src/jimpex/frontendFs.js'
Generate a Provider
with an already defined getDirectory
and getFileSystem
functions.
Params:
Name | Type | Attribute | Description |
getDirectory | RollupMiddlewareGetDirectory | A function to get the directory where Rollup is bundling the files. |
|
getFileSystem | RollupMiddlewareGetFileSystem | A function to get access to the file system after Rollup finishes bundling the files. |
Example:
// Generate the provider
const provider = rollupFrontendFs(() => 'some-dir', () => ...);
// Register it on the container
container.register(provider);
// Getting access to the service instance
const frontendFs = container.get('frontendFs');
public runtimeReplace(definitionsFn: Function():Object, name: string): ProjextRollupRuntimeReplacePlugin source
import {runtimeReplace} from 'projext-plugin-rollup/src/plugins/runtimeReplace/index.js'
Shorthand method to create an instance of ProjextRollupRuntimeReplacePlugin
Params:
Name | Type | Attribute | Description |
definitionsFn | Function():Object | When this function is called, it should return the object with the definitions. |
|
name | string |
|
The name of the plugin's instance. |
public stats(options: ProjextRollupStatsPluginOptions, name: string): ProjextRollupStatsPlugin source
import {stats} from 'projext-plugin-rollup/src/plugins/stats/index.js'
Shorthand method to create an instance of ProjextRollupStatsPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupStatsPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public stylesheetAssets(options: ProjextRollupStylesheetAssetsPluginOptions, name: string): ProjextRollupStylesheetAssetsPlugin source
import {stylesheetAssets} from 'projext-plugin-rollup/src/plugins/stylesheetAssets/index.js'
Shorthand method to create an instance of ProjextRollupStylesheetAssetsPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupStylesheetAssetsPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public stylesheetAssetsHelper(options: ProjextRollupStylesheetAssetsHelperPluginOptions, name: string): ProjextRollupStylesheetAssetsHelperPlugin source
import {stylesheetAssetsHelper} from 'projext-plugin-rollup/src/plugins/stylesheetAssets/helper.js'
Shorthand method to create an instance of ProjextRollupStylesheetAssetsHelperPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupStylesheetAssetsHelperPluginOptions | The options to customize the plugin behaviour. |
|
name | string |
|
The name of the plugin's instance. |
public stylesheetModulesFixer(options: ProjextRollupStylesheetModulesFixerPluginOptions, name: string): ProjextRollupStylesheetModulesFixerPlugin source
import {stylesheetModulesFixer} from 'projext-plugin-rollup/src/plugins/stylesheetModulesFixer/index.js'
Shorthand method to create an instance of ProjextRollupStylesheetModulesFixerPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupStylesheetModulesFixerPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public template(options: ProjextRollupTemplatePluginOptions, name: string): ProjextRollupTemplatePlugin source
import {template} from 'projext-plugin-rollup/src/plugins/template/index.js'
Shorthand method to create an instance of ProjextRollupTemplatePlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupTemplatePluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public urls(options: ProjextRollupURLsPluginOptions, name: string): ProjextRollupURLsPlugin source
import {urls} from 'projext-plugin-rollup/src/plugins/urls/index.js'
Shorthand method to create an instance of ProjextRollupURLsPlugin.
Params:
Name | Type | Attribute | Description |
options | ProjextRollupURLsPluginOptions | The options to customize the plugin behaviour. |
|
name | string | The name of the plugin's instance. |
public useExpress(expressApp: Express, targetToBuild: string, targetToServe: string): MiddlewareInformation source
import useExpress from 'projext-plugin-rollup/src/express.js'
Implements the Rollup middleware for a target on an Express app.
Params:
Name | Type | Attribute | Description |
expressApp | Express | The app where the middleware is going to be |
|
targetToBuild | string | The name of the target that will be builded on the middleware. |
|
targetToServe | string | The name of the target that will implement the middleware.
When the other target is builded, it will assume that is on the
distribution directory, and if the target serving it is being
executed from the source directory it won't be able to use the
file system without hardcoding some relatives paths from the
build to the source; to avoid that, the method gets the build
path of this target, so when using |
public useJimpex(jimpexApp: Jimpex, targetToBuild: string, targetToServe: string): MiddlewareInformation source
import useJimpex from 'projext-plugin-rollup/src/jimpex.js'
Implements the Rollup middleware for a target on a Jimpex app.
Params:
Name | Type | Attribute | Description |
jimpexApp | Jimpex | The app where the middleware is going to be registered. |
|
targetToBuild | string | The name of the target that will be builded on the middleware. |
|
targetToServe | string | The name of the target that will implement the middleware.
When the other target is builded, it will assume that is on the
distribution directory, and if the target serving it is being
executed from the source directory it won't be able to use the
file system without hardcoding some relatives paths from the
build to the source; to avoid that, the method gets the build
path of this target, so when using |
public windowAsGlobal(): ProjextRollupWindowAsGlobalPlugin source
import {windowAsGlobal} from 'projext-plugin-rollup/src/plugins/windowAsGlobal/index.js'
Shorthand method to create an instance of ProjextRollupWindowAsGlobalPlugin.