/** * Build-tool-agnostic CLI for the optional view compiler. * * This is thin glue around {@link compileToModule}: it reads template files, * emits the precompiled-expression module beside them (or into `--out-dir`), * and prints a coverage summary. It is dependency-free — pass explicit file * paths (let your shell expand globs) — and is meant to be wired into an * existing build, not to become a build tool of its own. * * Node's `fs`/`path` are imported lazily so the compiler barrel stays * environment-neutral; only the CLI functions touch the filesystem. * * @module bquery/view/compiler */ import { type EmitOptions } from './emit'; import type { CompileStats } from './types'; /** Options controlling where compiled modules are written. */ export type CompileFilesOptions = EmitOptions & { /** Directory to write outputs into. Defaults to alongside each input file. */ outDir?: string; /** Suffix appended before the output extension. Default: `'.bq-compiled'`. */ suffix?: string; /** Output file extension. Default: `'.js'`. */ ext?: string; }; /** Per-file compilation result. */ export type CompiledFileResult = { input: string; output: string; stats: CompileStats; }; /** * Compiles a list of template files to precompiled-expression modules. * * @example * ```ts * import { compileFiles } from '@bquery/bquery/view/compiler'; * * await compileFiles(['src/views/home.html'], { outDir: 'src/views/.compiled' }); * ``` */ export declare const compileFiles: (files: string[], options?: CompileFilesOptions) => Promise; /** Minimal console-shaped sink so the CLI is testable without globals. */ export type CliIO = { log: (msg: string) => void; error: (msg: string) => void; }; /** * Parses argv and runs {@link compileFiles}. Returns a process exit code * (`0` success, `1` usage error / failure). * * Usage: `bquery-view-compile [options] ` * --prefix

directive prefix (default: bq) * --out-dir

output directory (default: beside each input) * --suffix output filename suffix (default: .bq-compiled) * --ext output extension (default: .js) * --import import specifier (default: @bquery/bquery/view) */ export declare const runCompileCli: (argv: string[], io?: CliIO) => Promise; //# sourceMappingURL=cli.d.ts.map