Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Add support for template customization #131

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

devlato
Copy link

@devlato devlato commented Jun 26, 2020

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 using TEMPLATE_FILE environment variable.
  • --extension / -e – specifies an extension for a generated migration file. It also can be set using MIGRATION_FILE_EXTENSION environment variable.

A working demo is available as a fork of this library, named contentful-migrate-fork.

@devlato devlato mentioned this pull request Jun 26, 2020
@devlato devlato closed this Jun 26, 2020
@devlato devlato reopened this Jun 26, 2020
@devlato
Copy link
Author

devlato commented Jun 29, 2020

CC @deluan

@deluan
Copy link
Owner

deluan commented Oct 17, 2020

Hey @devlato, sorry for the long delay. As I said in #82 (comment), 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)?

},
"homepage": "https://github.com/deluan/contentful-migrate#readme",
"homepage": "https://github.com/devlato/contentful-migrate#readme",
Copy link

@Gisleburt Gisleburt Jan 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Watch out for the changes in package.json if you merge this PR, they'll mostly need to be put back to what they were before.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants