1 | export declare const FSTree: FSTree.Static;
|
2 | export declare const BroccoliPlugin: BroccoliPlugin.Static;
|
3 | export declare const walkSync: WalkSync;
|
4 | export declare const md5Hex: MD5Hex;
|
5 | export declare const heimdall: Heimdall;
|
6 | export interface Token {
|
7 | __tokenBrand: any;
|
8 | }
|
9 | export interface Heimdall {
|
10 | start(name: string): Token;
|
11 | stop(token: Token): void;
|
12 | }
|
13 | export declare type MD5Hex = (str: string) => string;
|
14 | export declare namespace BroccoliPlugin {
|
15 | interface PluginOptions {
|
16 | name?: string;
|
17 | annotation?: string;
|
18 | persistentOutput?: boolean;
|
19 | }
|
20 | interface Plugin {
|
21 | inputPaths: string[];
|
22 | outputPath: string;
|
23 | cachePath: string;
|
24 | }
|
25 | interface Static {
|
26 | new (inputNodes: any[], options?: any): Plugin;
|
27 | }
|
28 | }
|
29 | export interface WalkSync {
|
30 | (path: string, options?: any): string[];
|
31 | entries(path: string, options?: any): WalkSync.Entry[];
|
32 | }
|
33 | export declare namespace WalkSync {
|
34 | type Row = string | RegExp[];
|
35 | interface Entry {
|
36 | relativePath: string;
|
37 | basePath: string;
|
38 | fullPath: string;
|
39 | checksum: string;
|
40 | mode: number;
|
41 | size: number;
|
42 | mtime: Date;
|
43 | isDirectory(): boolean;
|
44 | }
|
45 | }
|
46 | export interface FSTree {
|
47 | calculatePatch(next: FSTree, isUnchanged?: (a: WalkSync.Entry, b: WalkSync.Entry) => {}): FSTree.PatchOp[];
|
48 | }
|
49 | export declare namespace FSTree {
|
50 | type Op = "unlink" | "create" | "mkdir" | "rmdir" | "change";
|
51 | type PatchOp = [Op, string, WalkSync.Entry];
|
52 | interface Static {
|
53 | fromEntries(entries: WalkSync.Entry[], options?: {
|
54 | sortAndExpand?: boolean;
|
55 | }): FSTree;
|
56 | }
|
57 | }
|