Home Reference Source

Typedef

Static Public Summary
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

Static Public

public MiddlewareGetDirectory: string: function source

Return:

string

The build directory of the target implementing the middleware.

public MiddlewareGetFileSystem: Promise<FileSystem, Error>: function source

Return:

Promise<FileSystem, Error>

The reason this is resolved on a promise is to avoid trying to accessing files before they are generated.

public MiddlewareInformation: Object source

Properties:

NameTypeAttributeDescription
middleware Middleware

The middleware that implements the Rollup build process.

getDirectory MiddlewareGetDirectory

To access the target implementing the middleware build directory.

getFileSystem MiddlewareGetFileSystem

To access the file system only when the middleware finishes the build process.

public ProjextRollupCSSPluginOptions: Object source

Properties:

NameTypeAttributeDescription
include Array

A list of expressions the name of a file should match in order to be processed by the plugin.

exclude Array

A list of expressions the name of a file shouldn't match in order to be processed by the plugin.

insert boolean

Whether the styles should be injected on the app <head > when the bundle finishes loading.

output string | boolean

This can be the name a file where all the files that match the filter would be bundled. The option can also be set to false so the styles would be returned as a string when required.

processor RollupStylesheetProcessor
  • nullable: true

A custom function to processed the styles.

insertFnName string

If insert is true, this will be used as the name of the function in charge of injecting the styles.

stats ProjextRollupPluginsStats

The function the plugin will call in order to inform a file was created.

public ProjextRollupCompressionPluginEntry: Object source

Properties:

NameTypeAttributeDescription
original string

The path to the file that was compressed.

compressed string

The path to the compressed file.

public ProjextRollupCompressionPluginOptions: Object source

Properties:

NameTypeAttributeDescription
folder string

The directory where the plugin will search for files.

include Array

A list of expressions the name of a file should match in order to be processed by the plugin.

exclude Array

A list of expressions the name of a file shouldn't match in order to be processed by the plugin.

stats ProjextRollupPluginsStats

The function the plugin will call in order to inform a file was created.

public ProjextRollupCopyPluginItem: Object source

Properties:

NameTypeAttributeDescription
from string

The file origin path.

to string

The file destination path.

transform ProjextRollupCopyPluginItemTransform
  • nullable: true

A custom function to modify the contents of the file to copy.

public ProjextRollupCopyPluginItemTransform(contents: Buffer): Promise<string, Error>: function source

Params:

NameTypeAttributeDescription
contents Buffer

The original contents of the file.

Return:

Promise<string, Error>

The updated contents.

public ProjextRollupCopyPluginOptions: Object source

Properties:

NameTypeAttributeDescription
files Array

A list of files information so the plugin can copy them. Each item should have a from and to property, otherwise the plugin will throw an error. See ProjextRollupCopyPluginItem.

stats ProjextRollupPluginsStats

The function the plugin will call in order to inform a file was copied.

public ProjextRollupDevServerPluginEvent(plugin: ProjextRollupDevServerPlugin): function source

Params:

NameTypeAttributeDescription
plugin ProjextRollupDevServerPlugin

public ProjextRollupDevServerPluginOptions: Object source

Properties:

NameTypeAttributeDescription
host string

The server hostname.

port number

The server port.

contentBase Array | string

The directory from where the files are going to be served. It can be a single directory or a list of them.

historyApiFallback boolean

Whether or not the server should redirect the user to the index.html after a 404.

https null | HTTPSOptions

The required files to run the server on HTTPs. They are the same that https.createServer supports.

open boolean

Whether or not the browser should be opened after starting the server.

logger Logger
  • nullable: true

A custom logger to log the server events.

proxied ProjextRollupDevServerPluginProxiedSettings
  • nullable: true

The settings in case the server is being proxied.

onStart ProjextRollupDevServerPluginEvent

A callback to be called when the server starts.

onStop ProjextRollupDevServerPluginEvent

A callback to be called when the server stops.

public ProjextRollupDevServerPluginOptions: Object source

Properties:

NameTypeAttributeDescription
host string

The host used to proxy the dev server.

https boolean

Whether or not the proxied host uses https.

public ProjextRollupNodeRunnerPluginEvent(plugin: ProjextRollupNodeRunnerPlugin): function source

Params:

NameTypeAttributeDescription
plugin ProjextRollupNodeRunnerPlugin

public ProjextRollupNodeRunnerPluginOptions: Object source

Properties:

NameTypeAttributeDescription
file string

The file to execute

logger Logger
  • nullable: true

A custom logger to log the server events.

inspect NodeInspectorSettings
  • nullable: true

The custom settings for the Node Inspector.

onStart ProjextRollupNodeRunnerPluginEvent

A callback to be called when the execution starts.

onStop ProjextRollupNodeRunnerPluginEvent

A callback to be called when the execution stops.

public ProjextRollupPluginURL: Object source

Properties:

NameTypeAttributeDescription
include Array

A list of expressions the name of a file should match in order to be processed by the plugin.

exclude Array

A list of expressions the name of a file shouldn't match in order to be processed by the plugin.

output string

The path to the where the a file would be copied. It supports the placeholders [name] for the file name and [ext] for its extension.

url string

The URL for the file. It supports the placeholders [name] for the file name and [ext] for its extension.

public ProjextRollupPluginsStats(plugin: string, filepath: string): function source

Params:

NameTypeAttributeDescription
plugin string

The name of the plugin that generated/copied the file.

filepath string

The file that was generated/copied.

public ProjextRollupStatsPluginCellsWidth: Object source

Properties:

NameTypeAttributeDescription
plugin number

The width for the plugin's cell.

file number

The width for the file path cell.

size number

The width for the file size cell.

public ProjextRollupStatsPluginLog: Object source

Properties:

NameTypeAttributeDescription
writeBundle function

The method Rollup calls after writing the files on the file system. When this happens, the plugin will log the report table on the console.

public ProjextRollupStatsPluginLogOptions: Object source

Properties:

NameTypeAttributeDescription
extraEntries Array

A list of extra entries to add.

logger Logger
  • nullable: true

A custom instance of Logger to log the report table.

afterLog function
  • nullable: true

A custom callback to call after the report table is logged.

public ProjextRollupStatsPluginOptions: Object source

Properties:

NameTypeAttributeDescription
path string

The path to the directory where all the files are generated. The plugin needs it so it can be removed when showing the files list.

public ProjextRollupStatsPluginReset: Object source

Properties:

NameTypeAttributeDescription
intro function

The method Rollup calls to get code to add on the top of the bundle. The plugin uses it as a "hook" in order to reset the entries list and thus, avoid duplicated entries when Rollup is on "watch mode".

public ProjextRollupStylesheetAssetsHelperPluginOptions: Object source

Properties:

NameTypeAttributeDescription
include Array

A list of expressions the name of a file should match in order to be processed by the plugin.

exclude Array

A list of expressions the name of a file shouldn't match in order to be processed by the plugin.

fnName string

The name of the function that will be used to wrap the code.

public ProjextRollupStylesheetAssetsPluginOptions: Object source

Properties:

NameTypeAttributeDescription
stylesheet string

The path to the CSS or JS file where the styles should be fixed.

insertFnNames Array

In case the stylesheet is a JS file, it's possible that the styles are being injected by a function, so this option can be used the different function names the plugin should search for in order to find CSS blocks.

urls ProjextRollupPluginURL

The set of URLs the plugin will use to validate the files inside the stylesheet in order to know if they should be processed, where to copy them and which URL to use.

stats ProjextRollupPluginsStats

The function the plugin will call in order to inform a file was created.

public ProjextRollupStylesheetModulesFixerPluginOptions: Object source

Properties:

NameTypeAttributeDescription
include Array

A list of expressions the name of a file should match in order to be processed by the plugin.

exclude Array

A list of expressions the name of a file shouldn't match in order to be processed by the plugin.

modulesExportName string

The name of the export statement for the CSS modules locals.

public ProjextRollupTemplatePluginOptions: Object source

Properties:

NameTypeAttributeDescription
template string

The path to the template file the plugin will use to inject the JS and CSS files.

output string

The path where the final file will be written.

scripts Array

A list of JS files that will be linked on the template.

scriptsAsync boolean

Whether or not to use async attribute on the script tags.

scriptsOnBody boolean

Whether or not to place the script tags on the body.

stylesheets Array

A list of CSS files that will be linked on the template.

urls ProjextRollupPluginURL

The set of URLs the plugin will use to validate the files required on the template in order to know if they should be processed, where to copy them and which URL to use.

stats ProjextRollupPluginsStats

The function the plugin will call in order to inform a file was copied.

public ProjextRollupURLsPluginOptions: Object source

Properties:

NameTypeAttributeDescription
urls ProjextRollupPluginURL

The set of URLs the plugin will use to validate the files in order to know if they should be processed, where to copy them and which URL to use.

stats ProjextRollupPluginsStats

The function the plugin will call in order to inform a file was copied.

public Provider: Object source

Properties:

NameTypeAttributeDescription
register ProviderRegisterMethod

The method that gets called when registering the provider.

public ProviderRegisterMethod(app: Jimple): function source

Params:

NameTypeAttributeDescription
app Jimple

A reference to the dependency injection container.

public RollupConfigurationOutputParams: Object source

Properties:

NameTypeAttributeDescription
file string

The path where the bundle will be generated.

format string

The format of the bundle (iife, cjs or umd).

sourcemap boolean

Whether or not a source map should be generated for the bundle.

name string

The export name of the bundle.

exports string
  • nullable: true

This is implemented when the target is a library. It allows the bundle to have named exports.

public RollupConfigurationParams: Object source

Properties:

NameTypeAttributeDescription
input string

The path for the entry file.

output RollupConfigurationOutputParams

The Rollup settings for the bundle generation.

target Target

The information of the target being bundled.

targetRules TargetFileRules

The rules to find the different file types a target may use.

definitions Function():Object

A function that generates a dictionary of variables that will be replaced on the bundled code.

buildType string

The intended build type: development or production.

paths RollupConfigurationPathsParams

A dictionary with the filenames formats and paths of the different files the bundle can generate.

copy Array

A list of TargetExtraFile with the information of files that need to be copied during the bundling process.

additionalWatch Array

A list of additional paths Rollup should watch for in order to restart the bundle.

public RollupConfigurationPathsParams: Object source

Properties:

NameTypeAttributeDescription
js string

The filename format and path for the bundle, on the distribution directory.

css string

The filename format and path for the generated stylesheet, on the distribution directory.

images string

The filename format and path for the images that are going to be copied to the distribution directory.

fonts string

The filename format and path for the font files that are going to be copied to the distribution directory.

public RollupConfigurations: Object source

Properties:

NameTypeAttributeDescription
node RollupConfigurationsByEnvironment

The build types configurations for a Node target.

browser RollupConfigurationsByEnvironment

The build types configurations for a browser target.

public RollupConfigurationsByEnvironment: Object source

Properties:

NameTypeAttributeDescription
production ConfigurationFile

The configuration service for a the target type production build.

development ConfigurationFile

The configuration service for a the target type development build.

public RollupFileDefinition(code: string, map: Object): Object source

public RollupFilter(filepath: string): boolean: function source

Params:

NameTypeAttributeDescription
filepath string

The path to validate.

Return:

boolean

Whether or not the path is valid.

public RollupPluginInfo: Object source

Properties:

NameTypeAttributeDescription
name string

The name of the plugin.

configuration string

The path to the Rollup configuration file.

external Array

The list of subpaths the plugin exposes and that should be handled as external dependencies, in order to avoid bundling them.

public RollupStylesheetProcessor(code: string): Promise<StringOrObject, Error>: function source

Params:

NameTypeAttributeDescription
code string

The style code to process.

Return:

Promise<StringOrObject, Error>

If the Promise gets resolved as a string, that would be used as the style code to either return or inject. But if it gets resolved as an Object, it's expected for it to have a css key with the style code, the rest of the keys will be added as named exports.

public StringOrObject: string | Object source