Closed chamois-d-or closed 2 years ago
Thanks @chamois-d-or!
You're right; the fields
property from the config file was not being passed to generateTypes()
. My mistake!
The fix has been published in v0.0.6
and can be installed with the following command:
npm run install --save-dev prismic-ts-codegen@latest
First time I do this! I hope this is the way!
Versions
Reproduction
Steps to reproduce
Add an integration fields configuration to prismicCodegen.config and run CLI : npm run prismic-ts-codegen
What is expected?
The CLI takes into account the configuration and creates types for Integration Fields relying on custom config. Here is an example
What is actually happening?
CLI is only generating a default field type for integration fields
video: prismicT.IntegrationFields
Guess
fieldConfigs that are in the config file are not passed to generateTypes by the CLI, so the configuration is not taken into account. see here: https://github.com/prismicio/prismic-ts-codegen/blob/main/src/cli/index.ts#L106
I hope that helps! thanks