@manuth/generator-wsc-package
Version:
A Generator for WoltLab Suite Core Packages.
37 lines • 1.23 kB
JavaScript
import { printNode, ts } from "ts-morph";
import { LocalFileInstructionMapping } from "./LocalFileInstructionMapping.js";
/**
* Provides the functionality to generate instruction-files for file-upload instructions.
*
* @template TSettings
* The type of the generator-settings.
*
* @template TOptions
* The type of the generator-options.
*
* @template TComponentOptions
* The type of the component-options.
*/
export class FileUploadMapping extends LocalFileInstructionMapping {
/**
* Initializes a new instance of the {@link FileUploadMapping `FileUploadMapping<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.insertPropertyAssignment(options.getProperty("Source").getChildIndex(), {
name: "Application",
initializer: printNode(ts.factory.createStringLiteral(this.Component.ComponentOptions.Application))
});
return options;
}
}
//# sourceMappingURL=FileUploadMapping.js.map