mattpocock / xstate-codegen

A codegen tool for 100% TS type-safety in XState
MIT License
245 stars 12 forks source link

Support multiple input patterns #59

Closed danielkcz closed 3 years ago

danielkcz commented 3 years ago

I kinda needed this for my project where machines are in different folders, so I went for it.

Sadly the gaze doesn't support multiple inputs and it would be annoying with callbacks. So I replaced it with chokidar which seems solid. I stumbled upon the issue where ready event is triggered too soon so I had to drop some of the previous logging and checks, but nothing too serious imo.

Fixes #49

changeset-bot[bot] commented 3 years ago

🦋 Changeset detected

Latest commit: 0fe4c1415e965d63e3a3644f9d2cb345c3de4bad

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 | Minor |

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

mattpocock commented 3 years ago

@FredyC I've been thinking about dropping gaze for chokidar as it seems like a better choice in general. I'll review this and merge it with priority. Thanks so much for this.

mattpocock commented 3 years ago

Tested locally, working wonderfully. Also fixes an annoying bug where it wasn't picking up new files added.