Closed icio closed 3 years ago
Hi @icio thanks for that sample code. Some of that might leak into the 'inpage' script in the near future :-)
I will only load a script from a third-party if I can specify an integrity tag, hence my preference for the versioned npm/unpkg.org route.
That makes sense, the current URL could grow breaking changes over time. And you can't be diligent enough with loading 3rd party scripts anyway. I guess that #143 wouldn't be of much use then either, unless it'd grow the possibility to be a mini unpkg.
Drawback of publishing bundled code to npm is that it increases the package size for the regular library. For some packages that doesn't matter a lot, but some of state-machine-cat's dependencies are really big and pulling them in twice (in node_modules and in a dist folder) will be noticeable.
For another diagramming library I wrote long ago (mscgenjs) I went the nine yards made a separate distribution - even though that one is almost dependency less (https://mscgen.js.org/embed.html - also available on unpkg: https://unpkg.com/mscgenjs-inpage@4.0.0/dist/mscgen-inpage.js).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Context
I have some data that describes the transition of some entities' state over time and I've written a script to turn that into an state-machine-cat JSON blob so I can review that's happening. My initial setup included only an index.html, index.js and style.css.
I had hoped that I would be able load smcat from a
I will only load a script from a third-party if I can specify an
integrity
tag, hence my preference for the versioned npm/unpkg.org route.