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

Build instructions for vscode extension?

Open hlovdal opened this issue 1 year ago • 0 comments

I also get error message "Could not find a machine at the current cursor", without any special characters in the path (just /c/git/xstatetest), and with all extensions except statelyai.stately-vscode disabled (in the workplace).

So I thought maybe I could compile the extension and attempt to debug the issue. However the readme for this repo is a bit thin...


XState: Open Visual Editor fails on vscode 1.86.1 my windows machine but works with vscode 1.86.0 in a on ubuntu VM.

mkdir xstatetest
cd xstatetest
npm init -y
npm install xstate@^4
code .

and create new file test1.ts

import { createMachine } from 'xstate';

const machine = createMachine({
  initial: 'asleep',
  states: {
    asleep: {
      on: {
        'wakes up': {
          target: 'awake',
        },
      },
    },
    awake: {
      on: {
        'falls asleep': {
          target: 'asleep',
        },
      },
    },
  },
});

hlovdal avatar Feb 13 '24 14:02 hlovdal