0.0.6 • Published 4 years ago

xstate-codegen-old v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

xstate-codegen

A Typescript codegen CLI for XState.

Birthed from a twitter rant. Read this to get an idea of what you're getting yourself in for.

This repository is EXPERIMENTAL. I'm yet even to do readme-driven development. Changes are subject to break things.

Usage

yarn global add xstate-codegen

xstate-codegen "src/**/**.machine.ts"

Watches any file with a machine.ts extension and adds typings for it.

Currently only works with React, but we plan to support other frameworks soon.

Enjoy!

Once

xstate-codegen "src/**/**.machine.ts" --once

Instead of watching, run the codegen only once. Handy for CI purposes.