@tts-tools/xmlbundle
Version:
Module to bundle/unbundle the XML UI files for Tabletop Simulator.
24 lines (23 loc) • 804 B
TypeScript
export interface BundleInformation {
/** All bundles found in an unbundled module mappyed by their name. */
bundles: Bundles;
/** The root bundle content. */
root: string;
}
type Bundles = Record<string, Bundle>;
export interface Bundle {
/** The name of the bundle. Does not include the `.xml` extension. */
name: string;
/** The content of the bundle. */
content: string;
}
/**
* Bundles the given XML by resolving `Include` nodes with a `src` attribute.
*/
export declare const bundle: (xmlUi: string, includePath: string | string[]) => string;
/**
* Unbundles the given XML by replacing comments generated from `bundle` with their respective `Include` node and `src`
* attribute.
*/
export declare const unbundle: (xmlUi: string) => BundleInformation;
export {};