Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rollup-plugin-copier

marverix3kISC1.1.0

Build Status Current Release [![L

rollup, plugin, rollup-plugin, copy, assets, copier, rollup-plugin-copier, rollup-plugin-copy

readme

rollup-plugin-copier

Build Status Current Release License: ISC

Simple Rollup.js plugin that copies desired files

Installation

npm install rollup-plugin-copier

Usage

In your rollup.config.js:

import copier from 'rollup-plugin-copier';

...

export default [
 {
  // some config
  plugins: [
    copier({
      items: [
        {
          src: 'some/sample/source.file',
          dest: 'will/be/copied.here'
        }
      ]
    })
  ]
 }
];

Options

  • items

    Required

    Array of items that should be copied

    Options for each item:

    • src

      Required

      Source path

    • dest

      Required

      Destination path

    • createPath

      Optional, Default false

      If path for destination file doesn't exist - create it.

  • hookOn

    Optional, Default buildEnd

    Which Rollup.js hook should be used.

  • verbose

    Optional, Default false

Authors

See also the list of contributors who participated in this project.

Thanks

This plugin is heavly inspired by rollup-plugin-copy (created by meuter), but it seems that it's not more developed/fixed.

License

This project is licensed under the ISC License - see the LICENSE file for details.

changelog

1.1.0 (2019-01-31)

  • Added createPath flag for item

1.0.1 (2019-01-31)

  • Module fixing

1.0.0 (2019-01-31)

  • First version