Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Conversation

@danielkcz
Copy link

@danielkcz danielkcz commented Nov 9, 2020

This PR builds on top of #59, so I will keep it draft until that one is merged.

Currently recommended --once on postinstall is rather fragile (#51). This PR adds a watcher that will recreate generated files automatically when they disappear.

@changeset-bot
Copy link

changeset-bot bot commented Nov 9, 2020

⚠️ No Changeset found

Latest commit: 1a09a31

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mattpocock mattpocock marked this pull request as ready for review December 19, 2020 20:05
@mattpocock
Copy link
Owner

@FredyC Could you add more detail as to why this is needed? I have tested locally and can't immediately see it working. Would love to hear more about your rationale

@danielkcz
Copy link
Author

@mattpocock I am not sure what else you need to know. It is basically a proper solution for #51. Instead of having postinstall script with --once, when you have codegen running in watch mode and generated files are deleted, it will write them again.

@danielkcz
Copy link
Author

@mattpocock Did new PR #68 as I messed up this one.

Also, I would add I am using this approach in the project for a couple of weeks and it's flawless. Besides remembering I need to have codegen running, I don't need to worry about yarn/npm reinstalls anymore.

@mattpocock
Copy link
Owner

OK, that's good to know. I tested it briefly locally but it wasn't working entirely as expected. I'll retest #68

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.

2 participants