@dovenv/templates - API documentation β
Classes β
Templates β
Constructors β
new Templates() β
ts
new Templates(__namedParameters: {
opts: Config;
utils: CommandSuper;
}): TemplatesParameters β
| Parameter | Type |
|---|---|
__namedParameters | object |
__namedParameters.opts? | Config |
__namedParameters.utils | CommandSuper |
Returns β
Methods β
get() β
ts
get(data: ConfigValue): Promise<string>Get a custom template.
Perfect method to be used outside an Dovenv environment.
Parameters β
| Parameter | Type | Description |
|---|---|---|
data | ConfigValue | Configuration object containing input details, constants, and optional output path. |
Returns β
Promise<string>
A promise that resolves to the processed content as a string.
list() β
ts
list(pattern?: string[]): Promise<void>Parameters β
| Parameter | Type |
|---|---|
pattern? | string[] |
Returns β
Promise<void>
run() β
ts
run(pattern?: string[]): Promise<undefined | {}>Process templates from the configuration object.
Parameters β
| Parameter | Type | Description |
|---|---|---|
pattern? | string[] | An array of template names to process. If not provided, all templates will be processed. |
Returns β
Promise<undefined | {}>
A promise that resolves to an object containing the content of each processed template.
Properties β
| Property | Type |
|---|---|
opts | undefined | Config |
Functions β
templatesPlugin() β
ts
function templatesPlugin(params?: Config): ConfigA plugin for dovenv to create templates.
Parameters β
| Parameter | Type | Description |
|---|---|---|
params? | Config | Optional configuration for the plugin. |
Returns β
Config
Type Aliases β
Config β
ts
type Config: { [key in string]: ConfigValue };References β
default β
Renames and re-exports templatesPlugin
