UNPKG

gulp-tateru-cli

Version:

Gulp plugin to build templates, using tateru-cli

48 lines 1.57 kB
import { type Environment } from 'tateru-cli'; /** * Formatter function type * * @param contents - The contents of the file to format. * @param fileType - The file type to format. Example: 'html', 'json', 'webmanifest', etc. */ export type Formatter = (contents: string, fileType?: string) => Promise<string>; /** * Minify function type * * @param contents - The contents of the file to minify. * @param fileType - The file type to minify. Example: 'html', 'json', 'webmanifest', etc. */ export type Minify = (contents: string, fileType?: string) => Promise<string>; /** * Gulp Tateru Options */ export interface GulpTateruCliOptions { /** * The environment to use from `tateru.config.json`. Example: `dev`, `prod`. */ env?: Environment; /** * The language to use from `tateru.config.json` for the generated files. Example: 'en', 'fr', 'es', etc. */ lang?: string; /** * The page to use from `tateru.config.json` for the generated files. Example: 'home', 'about', 'contact', etc. */ page?: string; /** * The formatter function to use for formatting the generated files, before minification. */ formatter?: Formatter; /** * The minify function to use for minifying the generated files. */ minify?: Minify; } /** * Gulp Plugin for Tateru CLI. * * @param options - The options to use for the plugin. * @returns - Pipe Stream. */ export declare const gulpTateruCli: (options?: GulpTateruCliOptions) => import("stream").Transform; //# sourceMappingURL=index.d.ts.map