xstate-codegen icon indicating copy to clipboard operation
xstate-codegen copied to clipboard

Regenerate compiled files on yarn/npm reinstall

Open danielkcz opened this issue 3 years ago • 3 comments

Replacement for PR #60 (somehow I messed up rebase).

danielkcz avatar Dec 19 '20 20:12 danielkcz

🦋 Changeset detected

Latest commit: a79de91648cd1cc87895ca7ee63df5e14eb6c541

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate-codegen Patch

Not sure what this means? Click here to learn what changesets are.

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

changeset-bot[bot] avatar Dec 19 '20 20:12 changeset-bot[bot]

@mattpocock I am not sure I understand your use case. You are not running xstate-codegen in the root?

I mean there isn't really anything magical about this solution. It simple uses getTargetDir() to find generated package.json file and when that gets deleted, it will write all generated files again. Watching over the whole folder wasn't working for some reason.

danielkcz avatar Dec 19 '20 21:12 danielkcz

@FredyC OK - that makes sense. I'll see if I can get it working for my use case.

You are not running xstate-codegen in the root?

Correct. There is a node_modules folder at the root and a node_modules folder inside package-name. I'll investigate more.

mattpocock avatar Dec 19 '20 21:12 mattpocock