1 | /**
|
2 | * Utility to copy the Partytown library files to a destination on the server.
|
3 | * Partytown requires its library files, such as `partytown.js` to be served
|
4 | * as static files from the same origin. By default the library assumes all the
|
5 | * files can be found at `/~partytown/`, but this can be configured.
|
6 | *
|
7 | * This utility function is to make it easier to locate the source library files
|
8 | * and copy them to your server's correct location, for example: `./public/~partytown/`.
|
9 | *
|
10 | * By default, both the production and debug builds are copied to the destination.
|
11 | * However, by setting the `debugDir` option to `false`, the debug directory will
|
12 | * not be copied.
|
13 | *
|
14 | * https://partytown.builder.io/copy-library-files
|
15 | *
|
16 | * @public
|
17 | */
|
18 | export declare function copyLibFiles(dest: string, opts?: CopyLibFilesOptions): Promise<{
|
19 | src: string;
|
20 | dest: string;
|
21 | }>;
|
22 |
|
23 | /**
|
24 | * @public
|
25 | */
|
26 | export declare interface CopyLibFilesOptions {
|
27 | /**
|
28 | * When set to `false` the `lib/debug` directory will not be copied. The default is
|
29 | * that both the production and debug directories are copied to the destination.
|
30 | */
|
31 | debugDir?: boolean;
|
32 | }
|
33 |
|
34 | /**
|
35 | * @public
|
36 | */
|
37 | export declare interface LibDirOptions {
|
38 | /**
|
39 | * When the `debugDir` option is set to `true`, the returned
|
40 | * directory is the absolute path to the `lib/debug` directory.
|
41 | */
|
42 | debugDir?: boolean;
|
43 | }
|
44 |
|
45 | /**
|
46 | * Absolute path to the Partytown lib directory within the
|
47 | * `@builder.io/partytown` package.
|
48 | *
|
49 | * https://partytown.builder.io/copy-library-files
|
50 | *
|
51 | * @public
|
52 | */
|
53 | export declare function libDirPath(opts?: LibDirOptions): string;
|
54 |
|
55 | /**
|
56 | * The Rollup plugin will copy Partytown `lib` directory to the given destination,
|
57 | * which must be an absolute file path.
|
58 | *
|
59 | * https://partytown.builder.io/copy-library-files
|
60 | *
|
61 | * @public
|
62 | */
|
63 | export declare function partytownRollup(opts: PartytownRollupOptions): {
|
64 | name: string;
|
65 | };
|
66 |
|
67 | /** @public */
|
68 | export declare interface PartytownRollupOptions {
|
69 | /** An absolute path to the destination directory where the lib files should be copied. */
|
70 | dest: string;
|
71 | /**
|
72 | * When `debug` is set to `false`, the `lib/debug` directory will not be copied.
|
73 | * The default is that both the production and debug directories are copied to the destination.
|
74 | */
|
75 | debug?: boolean;
|
76 | }
|
77 |
|
78 | /**
|
79 | * The Vite plugin will copy Partytown `lib` directory to the given destination,
|
80 | * which must be an absolute file path. When in dev mode, the Partytown
|
81 | * lib files will be served using the Vite Dev Server.
|
82 | *
|
83 | * https://partytown.builder.io/copy-library-files
|
84 | *
|
85 | * @public
|
86 | */
|
87 | export declare function partytownVite(opts: PartytownViteOptions): {
|
88 | name: string;
|
89 | };
|
90 |
|
91 | /** @public */
|
92 | export declare interface PartytownViteOptions extends PartytownRollupOptions {
|
93 | }
|
94 |
|
95 | export { }
|