UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

78 lines (77 loc) 2.71 kB
/// <reference types="yeoman-generator" /> import { GeneratorOptions, IGenerator, Question } from "@manuth/extended-yo-generator"; import { TSProjectGenerator } from "@manuth/generator-ts-project"; import { IWoltLabSettings } from "./Settings/IWoltLabSettings.js"; declare const WoltLabGenerator_base: typeof TSProjectGenerator & (new (...args: any[]) => import("@manuth/extended-yo-generator").GeneratorExtension<typeof TSProjectGenerator>); /** * Represents a generator for WoltLab-components. * * @template TSettings * The type of the generator-settings. * * @template TOptions * The type of the generator-options. */ export declare class WoltLabGenerator<TSettings extends IWoltLabSettings = IWoltLabSettings, TOptions extends GeneratorOptions = GeneratorOptions> extends WoltLabGenerator_base<TSettings, TOptions> implements IGenerator<TSettings, TOptions> { /** * Initializes a new instance of the {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`} class. * * @param args * A set of arguments for the generator. * * @param options * A set of options for the generator. */ constructor(args: string | string[], options: TOptions); /** * @inheritdoc */ get Questions(): Array<Question<TSettings>>; /** * Gets the name of the variable to save the package-metadata to. */ get PackageVariableName(): string; /** * Gets a question for asking for the author. */ protected get AuthorQuestion(): Question<TSettings>; /** * Gets a question for asking for the homepage. */ protected get HomePageQuestion(): Question<TSettings>; /** * Gets a question for asking for the component-identifier. */ protected get IdentifierQuestion(): Question<TSettings>; /** * Joins the arguments together and returns the resulting path relative to the assets-directory. * * @param path * The path that is to be joined. * * @returns * The path relative to the assets. */ assetPath(...path: string[]): string; /** * Joins the arguments together and returns the resulting path relative to the source-directory. * * @param path * The path that is to be joined. * * @returns * The path relative to the source-directory. */ sourcePath(...path: string[]): string; /** * Joins the arguments together and returns the resulting path relative to the component-directory. * * @param path * The path that is to be joined. * * @returns * The path relative to the component-directory. */ componentPath(...path: string[]): string; } export {};