1.0.2 • Published 1 year ago

@andrewdicks/rollup-plugin-copy-files-plus v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@andrewdicks/rollup-plugin-copy-files-plus

Copy files and folders (and optionally transform and rename them) during rollup bundling.

Installation

# yarn
yarn add @andrewdicks/rollup-plugin-copy-files-plus -D

# npm
npm install @andrewdicks/rollup-plugin-copy-files-plus -D

Usage

// rollup.config.js
import { RollupOptions } from "rollup";
import typescript from '@rollup/plugin-typescript';
import copyPlus from '@andrewdicks/rollup-plugin-copy-files';

export default {
  input: 'src/index.ts',
  output: {
    file: 'dist/index.mjs',
    format: 'esm'
  },
  plugins: [
    copyPlus({
      targets: [
        {
          basePath: '../../../some/relative/path',
          matchGlobs: [],
          ignoreGlobs: [],
          dest: './inside/dist/folder',
          flatten: false
        }
      ],
      dryRun: false
    })
  ]
}

Goals

  • ✅ Strongly-typed source code and published declarations
  • ✅ Easy-to-diagnose verbose output
  • ️✴️ Safeguards around escaping the rollup destination
  • ✅ Able to copy from parent folders using relative paths without escaping the rollup destination
  • To support:
    • ✅ Structured copy
    • ✅ Flattened copy
    • 🔲 File renaming
    • 🔲 File content transformation (simple replacement, and also complex transformation)

Key

  • 🔲️ Not Started
  • ✴️ In Progress
  • ✅ Done
  • ❌ Cancelled
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago