@maizzle/framework
Version:
Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.
33 lines (32 loc) • 1.56 kB
TypeScript
import { MaizzleConfig } from "../types/config.js";
import { defineConfig } from "../composables/defineConfig.js";
import { defaults } from "./defaults.js";
//#region src/config/index.d.ts
/**
* Resolve the Maizzle config.
*
* Always loads from the config file on disk (maizzle.config.{ts,js}),
* then merges the programmatic config on top, then fills in defaults.
*/
declare function resolveConfig(config?: Partial<MaizzleConfig> | string, cwd?: string): Promise<MaizzleConfig>;
/**
* Resolve config from a programmatic object only — never touches disk.
*
* `render()` uses this so a stray `maizzle.config.{ts,js}` in `cwd` can't
* silently alter output: the config you pass is the config you get, layered
* over defaults. Callers who want the project's file config load it
* explicitly via {@link resolveConfig} and pass the result in.
*/
declare function resolveConfigObject(config?: Partial<MaizzleConfig>, cwd?: string): MaizzleConfig;
/**
* Whether Node can natively `import()` this file as ESM — true for `.mjs`
* and for `.js` whose nearest package.json declares `"type": "module"`.
* jiti hands such files to Node's native loader, which caches them in the
* (unbustable) module registry, so we import them ourselves with a fresh
* query instead. Everything else (CJS, TS) goes through jiti, which already
* re-evaluates per instance.
*/
declare function isNativeESM(absolutePath: string): boolean;
//#endregion
export { defaults, defineConfig, isNativeESM, resolveConfig, resolveConfigObject };
//# sourceMappingURL=index.d.ts.map