UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

113 lines (112 loc) 3.95 kB
/// <reference types="yeoman-generator" /> import { GeneratorOptions, IFileMapping, Question } from "@manuth/extended-yo-generator"; import { InstructionComponent } from "../../../Components/InstructionComponent.js"; import { IWoltLabSettings } from "../../../Settings/IWoltLabSettings.js"; import { WoltLabGenerator } from "../../../WoltLabGenerator.js"; import { IThemeComponentOptions } from "../Settings/IThemeComponentOptions.js"; /** * Provides a component for generating theme-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 declare class ThemeInstructionComponent<TSettings extends IWoltLabSettings, TOptions extends GeneratorOptions, TComponentOptions extends IThemeComponentOptions> extends InstructionComponent<TSettings, TOptions, TComponentOptions> { /** * Initializes a new instance of the {@link ThemeInstructionComponent `ThemeInstructionComponent<TSettings, TOptions, TComponentOptions>`} class. * * @param generator * The generator of the component. */ constructor(generator: WoltLabGenerator<TSettings, TOptions>); /** * @inheritdoc */ get ID(): string; /** * @inheritdoc */ get DisplayName(): string; /** * @inheritdoc */ get FileMappings(): Array<IFileMapping<TSettings, TOptions>>; /** * @inheritdoc */ protected get InstructionFileMapping(): IFileMapping<TSettings, TOptions>; /** * Gets a question for asking for the name of the theme. */ protected get NameQuestion(): Question<TComponentOptions>; /** * Gets a question for asking for the human-readable name of the theme. */ protected get DisplayNameQuestion(): Question<TComponentOptions>; /** * Gets a question for asking for a description for the theme. */ protected get DescriptionQuestion(): Question<TComponentOptions>; /** * Gets a question for asking for {@link ThemeComponent `ThemeComponent`}s to use. */ protected get ComponentQuestion(): Question<TComponentOptions>; /** * Gets a question for asking for the name of the `.scss`-file containing custom code. */ protected get ScssFileNameQuestion(): Question<TComponentOptions>; /** * Gets a question for asking for the name of the `.scss`-file containing variable overrides. */ protected get OverridesFileNameQuestion(): Question<TComponentOptions>; /** * Gets a question for asking for the name of the `.json`-file containing the variables. */ protected get VariableFileNameQuestion(): Question<TComponentOptions>; /** * @inheritdoc */ protected get ComponentOptionQuestionCollection(): Array<Question<TComponentOptions>>; /** * @inheritdoc * * @param options * The options which have been provided by the user. * * @returns * The name of the instruction-class. */ protected GetClassName(options: TComponentOptions): string; /** * @inheritdoc * * @param options * The options which have been provided by the user. * * @returns * The name of the instruction-variable to export. */ protected GetVariableName(options: TComponentOptions): string; /** * Gets the path to the suggested directory to store theme-assets. * * @param path * The path to join to the theme-directory. * * @returns * The name of the directory containing theme-assets. */ protected GetThemeDirectory(...path: string[]): string; /** * Gets a question for asking for a path to a theme-asset. * * @returns * A question for asking for a path to a theme-asset. */ protected GetAssetQuestion(): Question<TComponentOptions>; }