@manuth/generator-wsc-package
Version:
A Generator for WoltLab Suite Core Packages.
39 lines • 1.2 kB
JavaScript
import { printNode, ts } from "ts-morph";
import { FileInstructionMapping } from "./FileInstructionMapping.js";
/**
* Provides the functionality to generate instruction-files containing nodes.
*
* @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 NodeInstructionFileMapping extends FileInstructionMapping {
/**
* Initializes a new instance of the {@link NodeInstructionFileMapping `NodeInstructionFileMapping<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: "Nodes",
initializer: printNode(ts.factory.createArrayLiteralExpression())
}
]);
return options;
}
}
//# sourceMappingURL=NodeInstructionFileMapping.js.map