@maizzle/framework
Version:
Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.
38 lines • 1.55 kB
TypeScript
import { MaizzleConfig } from "./types/config.js";
//#region src/build.d.ts
interface BuildResult {
files: string[];
config: MaizzleConfig;
}
/**
* Build all SFC email templates to HTML files.
*
* Creates a single Renderer instance, then loops through each template
* calling render → transformers → write to disk.
*
* Pass a `Partial<MaizzleConfig>` to override config inline, or a string
* to load config from a specific file path. Omit to load `maizzle.config`
* from the working directory.
*/
declare function build(configInput?: Partial<MaizzleConfig> | string): Promise<BuildResult>;
/**
* Decide whether to build in parallel and with how many workers.
*
* `config.parallel`:
* - omitted → parallel when `count > 50`, min(CPU count − 1, 8) workers
* - `true` → always parallel (ignores threshold), default workers
* - `false` → always sequential
* - `{ workers, threshold }` → parallel when `count > threshold` (default 50),
* using `workers` threads (default min(CPU count − 1, 8))
*
* Workers reload the config file to recover function hooks, so parallel only
* applies to file-based configs (a path or the default cwd config) — an inline
* config object has no file to reload and always builds sequentially.
*/
declare function resolveParallel(config: MaizzleConfig, count: number, configInput: Partial<MaizzleConfig> | string | undefined): {
enabled: boolean;
workers: number;
};
//#endregion
export { BuildResult, build, resolveParallel };
//# sourceMappingURL=build.d.ts.map