woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
56 lines (55 loc) • 1.64 kB
TypeScript
import { IInstruction } from "../../../PackageSystem/Instructions/IInstruction";
import { Compiler } from "../../Compiler";
/**
* Provides the functionality to compile an instruction.
*/
export declare class InstructionCompiler<T extends IInstruction> extends Compiler<T> {
/**
* Initializes a new instance of the `InstructionCompiler<T>` class.
*
* @param item
* The item to compile.
*/
constructor(item: T);
/**
* Gets the name of the file to write the compiled item to.
*/
readonly DestinationFileName: string;
/**
* Returns an XML `Document` which represents the compiled instruction.
*/
Serialize(): Document;
/**
* @inheritdoc
*/
protected Compile(): Promise<void>;
/**
* Copies files using `EJS`.
*
* @param source
* The source to copy the files from.
*
* @param destination
* The destination to copy the files to.
*
* @param context
* The context to use.
*/
protected CopyTemplate(source: string, destination: string, context?: {
[key: string]: any;
}): Promise<void>;
/**
* Joins the paths and returns the path contained by the package-folder.
*
* @param path
* The path that is to be joined.
*/
protected MakePackagePath(...path: string[]): string;
/**
* Joins the paths and returns the path contained by the destination-folder.
*
* @param path
* The path that is to be joined.
*/
protected MakeDestinationPath(...path: string[]): string;
}