-
Notifications
You must be signed in to change notification settings - Fork 54
/
index.d.ts
68 lines (57 loc) · 1.47 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import rollup from 'rollup';
import fs from 'fs-extra';
import globby from 'globby';
interface Target extends globby.GlobbyOptions {
/**
* Path or glob of what to copy.
*/
readonly src: string | readonly string[];
/**
* One or more destinations where to copy.
*/
readonly dest: string | readonly string[];
/**
* Change destination file or folder name.
*/
readonly rename?: string | ((name: string, extension: string, fullPath: string) => string);
/**
* Modify file contents.
*/
readonly transform?: (contents: Buffer, name: string) => any;
}
interface CopyOptions extends globby.GlobbyOptions, fs.WriteFileOptions, fs.CopyOptions {
/**
* Copy items once. Useful in watch mode.
* @default false
*/
readonly copyOnce?: boolean;
/**
* Copy items synchronous.
* @default false
*/
readonly copySync?: boolean;
/**
* Remove the directory structure of copied files.
* @default true
*/
readonly flatten?: boolean;
/**
* Rollup hook the plugin should use.
* @default 'buildEnd'
*/
readonly hook?: string;
/**
* Array of targets to copy.
* @default []
*/
readonly targets?: readonly Target[];
/**
* Output copied items to console.
* @default false
*/
readonly verbose?: boolean;
}
/**
* Copy files and folders using Rollup
*/
export default function copy(options?: CopyOptions): rollup.Plugin;