0.0.13 • Published 3 years ago

xstate-inspect-cli v0.0.13

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

What is the XState Inspector CLI?

I wanted a quick way to open an @xstate/inspect panel targeting a local file. By running a quick CLI command, you can target a single file with vite, build it with esbuild, and open it in the browser.

Changes to the machine will hot-reload into the browser, too.

Getting Started

yarn global add xstate-inspect-cli

Running the CLI

xstate-inspect-cli ./desired-file.ts

The inspector will open at localhost:3001. Check the console for any errors with your machine, for instance missing guards/services/actions etc.

Limitations

  1. Your machine must be exported from the module, i.e. export const machine = createMachine();, though you can export multiple machines.
  2. Works best in files where the machine is one of very few exports. Likely won't work if you are importing many modules or executing arbitrary code in your machine file.
  3. Modules which are not parse-able by vite may fail the build.
  4. Probably a bunch of others I haven't discovered yet.
0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago