@dovenv/templates
- API documentation โ
Classes โ
Templates โ
Constructors โ
new Templates() โ
ts
new Templates(__namedParameters: {
opts: Config;
utils: CommandSuper;
}): Templates
Parameters โ
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): Config
A 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