diff --git a/lib/types.ts b/lib/types.ts new file mode 100644 index 0000000..4a982ea --- /dev/null +++ b/lib/types.ts @@ -0,0 +1,26 @@ +export interface FaucetPlugin { + (config: T[], assetManager: AssetManager, options: FaucetPluginOptions): FaucetPluginFunc +} + +export interface FaucetPluginFunc { + (filepaths: string[]): Promise +} + +export interface FaucetPluginOptions { + sourcemaps: boolean, + compact: boolean +} + +export interface AssetManager { + resolvePath: (path: string, opts?: ResolvePathOpts) => string + writeFile: (targetPath: string, content: Buffer, options: WriteFileOpts) => Promise +} + +export interface ResolvePathOpts { + enforceRelative?: boolean +} + +export interface WriteFileOpts { + targetDir: string, + fingerprint?: boolean +}