rollup-plugin-copy

  • Version 3.5.0
  • Published
  • 16.6 kB
  • 5 dependencies
  • MIT license

Install

npm i rollup-plugin-copy
yarn add rollup-plugin-copy
pnpm add rollup-plugin-copy

Overview

Copy files and folders using Rollup

Index

Functions

function copy

copy: (options?: CopyOptions) => rollup.Plugin;
  • Copy files and folders using Rollup

Interfaces

interface CopyOptions

interface CopyOptions
extends globby.GlobbyOptions,
fs.WriteFileOptions,
fs.CopyOptions {}

    property copyOnce

    readonly copyOnce?: boolean;
    • Copy items once. Useful in watch mode. false

    property copySync

    readonly copySync?: boolean;
    • Copy items synchronous. false

    property flatten

    readonly flatten?: boolean;
    • Remove the directory structure of copied files. true

    property hook

    readonly hook?: string;
    • Rollup hook the plugin should use. 'buildEnd'

    property targets

    readonly targets?: readonly Target[];
    • Array of targets to copy. []

    property verbose

    readonly verbose?: boolean;
    • Output copied items to console. false

    interface Target

    interface Target extends globby.GlobbyOptions {}

      property dest

      readonly dest: string | readonly string[];
      • One or more destinations where to copy.

      property rename

      readonly rename?:
      | string
      | ((name: string, extension: string, fullPath: string) => string);
      • Change destination file or folder name.

      property src

      readonly src: string | readonly string[];
      • Path or glob of what to copy.

      property transform

      readonly transform?: (contents: Buffer, name: string) => any;
      • Modify file contents.

      Package Files (1)

      Dependencies (5)

      Dev Dependencies (13)

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rollup-plugin-copy.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rollup-plugin-copy)
      • HTML
        <a href="https://www.jsdocs.io/package/rollup-plugin-copy"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>