Skip to content

Commit 877c525

Browse files
committed
Fixup: Indent in types.ts
1 parent db85748 commit 877c525

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

types.ts

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,63 @@
11
// faucet-pipeline-core types
22
export interface FaucetPlugin<T> {
3-
(config: T[], assetManager: AssetManager, options: FaucetPluginOptions): FaucetPluginFunc
3+
(config: T[], assetManager: AssetManager, options: FaucetPluginOptions): FaucetPluginFunc
44
}
55

66
export interface FaucetPluginFunc {
7-
(filepaths: string[]): Promise<unknown>
7+
(filepaths: string[]): Promise<unknown>
88
}
99

1010
export interface FaucetPluginOptions {
11-
browsers?: string[],
12-
sourcemaps?: boolean,
13-
compact?: boolean
11+
browsers?: string[],
12+
sourcemaps?: boolean,
13+
compact?: boolean
1414
}
1515

1616
export interface AssetManager {
17-
resolvePath: (path: string, opts?: ResolvePathOpts) => string
17+
resolvePath: (path: string, opts?: ResolvePathOpts) => string
1818
writeFile: (targetPath: string, content: Buffer, options: WriteFileOpts) => Promise<unknown>
1919
}
2020

2121
export interface ResolvePathOpts {
22-
enforceRelative?: boolean
22+
enforceRelative?: boolean
2323
}
2424

2525
export interface WriteFileOpts {
26-
targetDir: string,
27-
fingerprint?: boolean
26+
targetDir: string,
27+
fingerprint?: boolean
2828
}
2929

3030
// faucet-pipeline-static types
3131
export interface Config {
32-
source: string,
33-
target: string,
34-
targetDir: string,
35-
fingerprint?: boolean,
36-
compact?: CompactorMap,
37-
assetManager: AssetManager,
38-
filter?: (fileName: string) => boolean
32+
source: string,
33+
target: string,
34+
targetDir: string,
35+
fingerprint?: boolean,
36+
compact?: CompactorMap,
37+
assetManager: AssetManager,
38+
filter?: (fileName: string) => boolean
3939
}
4040

4141
export interface CompactorMap {
42-
[fileExtension: string]: Compactor
42+
[fileExtension: string]: Compactor
4343
}
4444

4545
export interface Compactor {
46-
(contact: Buffer): Promise<Buffer>
46+
(contact: Buffer): Promise<Buffer>
4747
}
4848

4949
export interface ProcessFile {
50-
source: string,
51-
target: string,
52-
targetDir: string,
53-
fingerprint?: boolean,
54-
compactors: CompactorMap,
55-
assetManager: AssetManager,
50+
(fileName: string, opts: ProcessFileOpts): Promise<unknown>
51+
}
52+
53+
export interface ProcessFileOpts {
54+
source: string,
55+
target: string,
56+
writeFileOptions: WriteFileOpts,
57+
assetManager: AssetManager,
5658
}
5759

5860
export interface FileFinderOptions {
59-
skipDotfiles: boolean,
60-
filter?: (filename: string) => boolean
61+
skipDotfiles: boolean,
62+
filter?: (filename: string) => boolean
6163
}

0 commit comments

Comments
 (0)