UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

43 lines 1.42 kB
import { printNode, ts } from "ts-morph"; import { InstructionFileMapping } from "../../../FileMappings/InstructionFileMapping.js"; /** * Provides the functionality to generate php instruction files. * * @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 PHPInstructionFileMapping extends InstructionFileMapping { /** * Initializes a new instance of the {@link PHPInstructionFileMapping `PHPInstructionFileMapping<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.addPropertyAssignments([ { name: "Application", initializer: printNode(ts.factory.createStringLiteral(this.Component.ComponentOptions.Application)) }, { name: "FileName", initializer: printNode(ts.factory.createStringLiteral(this.Component.ComponentOptions.FileName)) } ]); return options; } } //# sourceMappingURL=PHPInstructionFileMapping.js.map