Open devlato opened 4 years ago
CC @deluan
Hey @devlato, sorry for the long delay. As I said in https://github.com/deluan/contentful-migrate/pull/82#issuecomment-711021321, I don't have a TypeScript environment/project to test this, so I'm not sure this is the best way to support TS.
With this approach, do you still need to register the TS compiler (like in #82)?
This PR addresses an issue with missing support for generating migrations in TypeScript by introducing new options and/or environment variables for customizing the migration template file and generated migration file extension, for the
create
command.The new options are:
--migration-template
/-t
– specifies a template file. If a relative path provided, it will be resolved relative to the current working directory. It also can be set usingTEMPLATE_FILE
environment variable.--extension
/-e
– specifies an extension for a generated migration file. It also can be set usingMIGRATION_FILE_EXTENSION
environment variable.A working demo is available as a fork of this library, named contentful-migrate-fork.