Home Reference Source
import {ProjextRollupCopyPlugin} from 'projext-plugin-rollup/src/plugins/copy/index.js'
public class | source

ProjextRollupCopyPlugin

This is a Rollup plugin that copies specific files during the bundling process.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

The name of the plugin's instance.

Method Summary

Public Methods
public

Gets the plugin options

public

This is called after Rollup finishes writing the files on the file system.

Public Constructors

public constructor(options: ProjextRollupCopyPluginOptions, name: string) source

Params:

NameTypeAttributeDescription
options ProjextRollupCopyPluginOptions
  • optional
  • default: {}

The options to customize the plugin behaviour.

name string
  • optional
  • default: 'projext-rollup-plugin-copy'

The name of the plugin's instance.

Public Members

public name: string source

The name of the plugin's instance.

Public Methods

public getOptions(): ProjextRollupCopyPluginOptions source

Gets the plugin options

public writeBundle(): Promise<Array, Error> source

This is called after Rollup finishes writing the files on the file system. This is where the plugin will filter the files that doesn't exist and copy the rest.

Return:

Promise<Array, Error>

The resolved array has the path for each copied file.