probmods / webppl-viz

Visualization for WebPPL
http://probmods.github.io/webppl-viz/
Other
14 stars 9 forks source link

Automatically open graphs if process.env.WEBPPL_VIZ_AUTOOPEN is set (resolves #86) #87

Closed smihael closed 6 years ago

smihael commented 6 years ago

You have to run export WEBPPL_VIZ_AUTOOPEN="true" for this to work. Resolves bug #86

smihael commented 6 years ago

I also changed naming of graphs in rev 95b13b6 from md5 hash into date-time format to avoid confusion, but this is not essential.

smihael commented 6 years ago

I fixed the typo. As regards Windows support, I can't test on my own, but according to https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html working with environment variables in Node.js should be possible on Windows as well using the sysdm.cpl tool.

smihael commented 6 years ago

Can you also add cfacec3ac8c8562778506720147d83d9ff22985e from my fork?

longouyang commented 6 years ago

I think I wrote it that way to avoid calling require('fs') inside the browser, because I wasn't sure that would work.

If you can do some testing and determine that declaring var fs = require('fs') doesn't break the browser build, then I can add it.