UNPKG

europa-build

Version:

Tool for generating and maintaining Europa plugins and presets

35 lines (34 loc) 1.49 kB
import { CommonTemplateProvider, CommonTemplateProviderOptions } from "../CommonTemplateProvider"; import { TemplateCliOption, TemplateContext } from "../TemplateProvider"; import { TemplateProviderType } from "../TemplateProviderType"; /** * An abstract {@link TemplateProvider} that is intended for plugin package template providers. */ export declare abstract class CommonPluginTemplateProvider<C extends CommonPluginTemplateContext> extends CommonTemplateProvider<C, CommonPluginTemplateContext> { /** * Creates an instance of {@link CommonPluginTemplateProvider} using the `options` provided. * * @param options - The options to be used. */ protected constructor(options: CommonPluginTemplateProviderOptions); createCommonCliOptions(): TemplateCliOption[]; createCommonContext(options: Partial<C>): Promise<CommonPluginTemplateContext>; getType(): TemplateProviderType; } /** * The context passed to a plugin package template during rendering. */ export interface CommonPluginTemplateContext extends TemplateContext { /** * Whether the plugin package belongs to the default preset. */ readonly isDefaultPreset: boolean; /** * The name of the preset package to which the plugin package belongs, where applicable. */ readonly preset?: string; } /** * The options used by {@link CommonPluginTemplateProvider}. */ export declare type CommonPluginTemplateProviderOptions = CommonTemplateProviderOptions;