Files
tsbundle/ts/interfaces/index.ts
Juergen Kunz 12c5655251 feat(includeFiles): support {from, to} object form for custom serve paths
includeFiles now accepts string | {from, to} entries. The object form
allows specifying a custom serve path (e.g. ./html/index.html -> index.html)
for base64ts bundled content.
2026-02-24 17:02:46 +00:00

40 lines
924 B
TypeScript

export interface ICliOptions {
commonjs?: boolean;
skiplibcheck?: boolean;
production?: boolean;
bundler: 'esbuild' | 'rolldown' | 'rspack';
}
export interface IEnvTransportOptions {
cwd: string;
from: string;
to: string;
mode: 'test' | 'production';
argv: ICliOptions;
}
// Custom bundle configuration types
export type TOutputMode = 'bundle' | 'base64ts';
export type TBundler = 'esbuild' | 'rolldown' | 'rspack';
export type TIncludeFile = string | { from: string; to: string };
export interface IBundleConfig {
from: string;
to: string;
outputMode?: TOutputMode;
bundler?: TBundler;
production?: boolean;
includeFiles?: TIncludeFile[];
maxLineLength?: number; // For base64ts output: max chars per line. 0 or undefined = unlimited (default)
}
export interface ITsbundleConfig {
bundles: IBundleConfig[];
}
export interface IBase64File {
path: string;
contentBase64: string;
}