UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

37 lines 1.22 kB
import { printNode, ts } from "ts-morph"; import { FileUploadMapping } from "../../../FileMappings/FileUploadMapping.js"; /** * Provides the functionality to generate self-contained php script instructions. * * @template TSettings * The type of the settings of the generator. * * @template TOptions * The type of the options of the generator. * * @template TComponentOptions * The type of the options of the component. */ export class SelfContainedPHPFileMapping extends FileUploadMapping { /** * Initializes a new instance of the {@link SelfContainedPHPFileMapping `SelfContainedPHPFileMapping<TSettings, TOptions, TComponentOptions>`} class. * * @param component * The component to create an instruction-file for. */ constructor(component) { super(component); } /** * @inheritdoc */ get InstructionOptions() { let options = super.InstructionOptions; options.addPropertyAssignment({ name: "Destination", initializer: printNode(ts.factory.createStringLiteral(this.Component.ComponentOptions.FileName)) }); return options; } } //# sourceMappingURL=SelfContainedPHPFileMapping.js.map