8000 GitHub - uraitakahito/rollup-plugin-copy: Copy files and folders using Rollup
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

uraitakahito/rollup-plugin-copy

 
 

Repository files navigation

rollup-plugin-copy

Copy files and folders, with glob support.

This is a variant of rollup-plugin-copy.

The following changes have been made:

  • Added a feature to watch for changes in files specified in targets' src during watch mode.
  • Only changes in input and targets' src are detected. In other words, targets' dest is not monitored.
  • This feature is off by default. When off, it is compatible with the original.

Original rollup-plugin-copy is here.

Original rollup-plugin-copy pull request is here.

Usage

Additional Configuration

watchTargets

Type: boolean | Default: false

Add the files specified in targets to the watch list

import copy from "@uraitakahito/rollup-plugin-copy";

export default {
  input: "src/main.js",
  output: {
    file: "dist/bundle.js",
    format: "es",
  },
  plugins: [
    copy({
      targets: [
        { src: "src/index.html", dest: "dist" },
        { src: "src/image/**/*", dest: "dist/image" },
      ],
      verbose: true,
      watchTargets: true,
    }),
  ],
};

And run:

% rollup --config --watch

A sample repository using this plugin can be found here.

Original Author

License

MIT

About

Copy files and folders using Rollup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0