Closed jbcpollak closed 9 years ago
Good question. Some thoughts:
Parsing and translating to text formats work just as well in node.js as in the browser, so those that could be released as one or modules (after doing some npm pyrotechnics :-) )
=> What is your use case/ what triggered your question?
Hum, I wonder if you could use phantomjs to get a DOM? I guess that might be a bit clunky.
I was trying to figure out how to use the project with a static website generator like hexo.io, but I didn't realize you can embed mscgen_js into a website. Is it possible to do that and load the msc source from a separate file? Also can the compiled JS file be loaded as a bower dependency?
I don't mind making separate ajax calls - what if like to be able to do is write a single page app that loads the MSC and renders it.
I'll make a separate issue for bower, and you can prioritize it as you can!
On Fri, Oct 9, 2015, 7:29 AM Sander Verweij notifications@github.com wrote:
-
Phantomjs: I've been playing around with it for testing purposes. I agree it feels a bit clunky, and I'll have to look into the glue-work but if the performance is good enough (and installing isn't too much of a hassle...) why not. I'll keep it in mind.
Loading from a separate msc source file is possible, but it'd mean the inpage script would need to do an ajax call to retrieve it.
Would that be usable enough for a static website?
There's more files to load, so will be slower.
- when running it from file:// it won't work on webkit browsers.
Publishing as a bower package: good plan. It has just landed somewhere in the top of my todo list (no guarantees) :-) .
— Reply to this email directly or view it on GitHub https://github.com/sverweij/mscgen_js/issues/206#issuecomment-146839102.
A bower package with only the mscgen-inpage.js is now available, so you can load it as a dependency
bower install mscgen_js-inpage-package
Thats great, thanks!
On Sun, Oct 11, 2015 at 7:28 PM Sander Verweij notifications@github.com wrote:
A bower package with only the mscgen-inpage.js is now available, so you can load it as a dependency
bower install mscgen_js-inpage-package
— Reply to this email directly or view it on GitHub https://github.com/sverweij/mscgen_js/issues/206#issuecomment-147255202.
Any thought to deploying this to npm to make it usable as a module?