xstate-viz
xstate-viz copied to clipboard
We need a way to run this locally.
PR incoming
@davidkpiano It's quick and dirty, and maybe overly complex, but the HapiJS server is what I know, so I thought I would provide this. See PR #5.
Hi, I think it would be great to have a way to run xstate-viz
locally. I'm working on a tool for doing this too. IMO the cleaner way is to pack xstate-viz
as a React component and publish it on NPM so other projects can depend on it. Once published we can easily use it for xstate-cli
or other projects that allow local/offline use or other tooling projects. I can contribute with the setup of this. What do you think? @davidkpiano, @createthis.
@carloslfu I think either way is fine. I just want to make it more accessible with clear instructions so people can use it.
I'm noticing the styles are messed up in this local run version and the update button doesn't work. Not sure what's up with that.
Since there are no real api requests I did go the way to download the website which includes the locally executes javascripts for now. Would also prefer a package to avoid doing redoing this procedure when updates arrive.
I was able to get this running locally by following these steps:
- Run
npm i
in both the root and in /public - In root, run
npm link
- In public, run
npm link @statecharts/xstate-viz
- In root, run
npm run develop
Once @davidkpiano adds the submachines(Actors) to the visualizer. I will package this into an Electron app that can be used on most platforms.