@kosko/generateFunctionsgeneratepublicgenerate Callablegenerate(options: GenerateOptions): Promise<Result>Finds components with glob patterns in the specified path and returns exported values from each components.@remarksExtension names is optional in options.components because it's appended automatically. (e.g. foo => foo?(.{js,json})) Extensions are from require.extensions. You can require ts-node/register to add support for .ts extension. Note that this function currently is only available on Node.js.@throwsGenerateError Thrown if an error occurred.@throwsResolveError Propagated from resolve function.@throwsAggregateError Thrown if multiple errors occurred.@seeresolveParametersoptions: GenerateOptionsReturns Promise<Result>
Finds components with glob patterns in the specified path and returns exported values from each components.
Extension names is optional in
options.components
because it's appended automatically. (e.g.foo
=>foo?(.{js,json})
)Extensions are from
require.extensions
. You can requirets-node/register
to add support for.ts
extension.Note that this function currently is only available on Node.js.
GenerateError Thrown if an error occurred.
ResolveError Propagated from resolve function.
AggregateError Thrown if multiple errors occurred.
resolve