一覧へ戻る
Lazyuki/rollup-plugin-mv(新しいタブで開きます)
主要言語: TypeScript
Move files on the rollup output
- star 数
- 3
- watcher 数
- 1
- fork 数
- 3
- issue 数
- 0
- 最終更新
- 2022/05/31
主要言語: TypeScript
Move files on the rollup output
🍣 A Rollup plugin to move around generated files and directories
This plugin requires an LTS Node version (v8.0.0+) and Rollup
Using npm:
npm install rollup-plugin-mv --save-dev
Create a rollup.config.js configuration file and import the plugin:
import mv from "rollup-plugin-mv"; export default { input: "src/index.js", output: { dir: "output", format: "cjs", }, plugins: [ mv( [ { src: "dist/file", dest: "dist/assets/file" }, { src: "dist/folder", dest: "dist/assets/dir", overwrite: true, }, ], { overwrite: false, } ), ], };
The first argument accepts an object or an array of objects with the following shape:
{ /** * Source file or directory */ src: string; /** * Destination file or directory */ dest: string; /** * Overwrite existing file or directory. */ overwrite?: boolean; }
Type: boolean
Default: false
Overwrite existing file or directory.
Type: boolean
Default: false
Executes the move command only once even if there are multiple outputs.