UNPKG

1.71 kBTypeScriptView Raw
1import BroccoliPlugin = require("broccoli-plugin");
2/**
3 * An object where the keys are the files that will be created in the tree and
4 * the values are the source files.
5 *
6 * @interface FileMap
7 */
8interface FileMap {
9 [relativePath: string]: string;
10}
11declare type BroccoliSymbolicLinkerOptions = Pick<BroccoliPlugin.BroccoliPluginOptions, "annotation" | "persistentOutput">;
12/**
13 * Creates symlinks to the source files specified.
14 *
15 * BroccoliSymbolicLinker
16 */
17export declare class BroccoliSymbolicLinker extends BroccoliPlugin {
18 files: FileMap;
19 fakeOutputPath: string | undefined;
20 constructor(fileMap?: FileMap | undefined, options?: BroccoliSymbolicLinkerOptions);
21 reset(fileMap?: FileMap | undefined): void;
22 /**
23 * Record that a symlink should be created from src to dest.
24 *
25 * This can be called many times before the build method is invoked.
26 * Calling it after will not have an effect until the next time build() is
27 * invoked.
28 *
29 * @param src The file that should be symlinked into the tree.
30 * @param dest the relative path from the tree's root to the location of the
31 * symlink. the filename does not have to be the same.
32 * @returns the absolute path to the location where the symlink will be created.
33 */
34 ln_s(src: string, dest: string): string;
35 /**
36 * Returns the number of symlinks that will be created.
37 */
38 numberOfFiles(): number;
39 /**
40 * Create the symlinks. Directories to them will be created as necessary.
41 */
42 build(): void;
43 /**
44 * Output the symlinks that will be created for debugging.
45 */
46 debug(): string;
47}
48export {};
49//# sourceMappingURL=broccoli-ln-s.d.ts.map
\No newline at end of file