1 | import rollup from 'rollup';
|
2 | import fs from 'fs-extra';
|
3 | import globby from 'globby';
|
4 |
|
5 | interface Target extends globby.GlobbyOptions {
|
6 | |
7 |
|
8 |
|
9 | readonly src: string | readonly string[];
|
10 |
|
11 | |
12 |
|
13 |
|
14 | readonly dest: string | readonly string[];
|
15 |
|
16 | |
17 |
|
18 |
|
19 | readonly rename?: string | ((name: string, extension: string, fullPath: string) => string);
|
20 |
|
21 | /**
|
22 | * Modify file contents.
|
23 | */
|
24 | readonly transform?: (contents: Buffer, name: string) => any;
|
25 | }
|
26 |
|
27 | interface CopyOptions extends globby.GlobbyOptions, fs.WriteFileOptions, fs.CopyOptions {
|
28 | |
29 |
|
30 |
|
31 |
|
32 | readonly copyOnce?: boolean;
|
33 |
|
34 | |
35 |
|
36 |
|
37 |
|
38 | readonly copySync?: boolean;
|
39 |
|
40 | |
41 |
|
42 |
|
43 |
|
44 | readonly flatten?: boolean;
|
45 |
|
46 | |
47 |
|
48 |
|
49 |
|
50 | readonly hook?: string;
|
51 |
|
52 | |
53 |
|
54 |
|
55 |
|
56 | readonly targets?: readonly Target[];
|
57 |
|
58 | |
59 |
|
60 |
|
61 |
|
62 | readonly verbose?: boolean;
|
63 | }
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | export default function copy(options?: CopyOptions): rollup.Plugin;
|