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

We need a way to run this locally.

Open createthis opened this issue 6 years ago • 6 comments

PR incoming

createthis avatar Jan 17 '19 14:01 createthis

@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.

createthis avatar Jan 17 '19 14:01 createthis

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 avatar Jan 17 '19 14:01 carloslfu

@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.

createthis avatar Jan 17 '19 14:01 createthis

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.

ajcool2k avatar Jan 25 '19 09:01 ajcool2k

I was able to get this running locally by following these steps:

  1. Run npm i in both the root and in /public
  2. In root, run npm link
  3. In public, run npm link @statecharts/xstate-viz
  4. In root, run npm run develop

RohitRajendran avatar Apr 23 '19 15:04 RohitRajendran

Once @davidkpiano adds the submachines(Actors) to the visualizer. I will package this into an Electron app that can be used on most platforms.

leonwilly avatar Jun 03 '19 00:06 leonwilly