These are chat archives for biojs/biojs

17th
Apr 2019
Yo Yehudi
@yochannah
Apr 17 08:39
Thanks @awasthishubh! :heart_eyes:
Yo Yehudi
@yochannah
Apr 17 08:46
@IbrahimTanyalcin - this is probably the tutorial you're looking for https://edu.biojs.net/details/package_json/ - look at the snippets section. https://www.npmjs.com/package/mplexviz-ngraph has a good example
Ibrahim Tanyalcin
@IbrahimTanyalcin
Apr 17 11:38
@yochannah ok, I pushed a new version , hopefully it'll get picked up. Just one question, I am guessing that the sniper field in package.json is for local development ? Because I presume you are internally converting require statements like require("lexicon-mono-seq") into a valid url such as https://cdn.jsdelivr.net/npm/lexicon-mono-seq@1.2.4/lexiconMonoSeq.v0.17.3.js or whatever the main field of package.json is pointing at. Or am I completely wrong with my assumption (which means a build is rendered at your backend servers first)
Yo Yehudi
@yochannah
Apr 17 11:41
this is actually kind of in flux at the minute! we've found that sometimes building components successfully can be really tricky (large packages often time out, for example, or poorly defined dependencies) so we're trying to encourage people to include build versions of their files. This will also make it possible for people to implement components using a CDN link and copy/pasting a couple of lines of code rather than having to buid a package (anyone who knows a little HTML can copy/paste and tweak a component config, whereas there is a lot more knowhow required to build an npm component).
right now we try to build / prepare components where possible, but we're working on a more user friendly spec for BioJS 3.0
Yo Yehudi
@yochannah
Apr 17 11:46
I'll try to summon @DennisSchwartz for comment
Ibrahim Tanyalcin
@IbrahimTanyalcin
Apr 17 14:45
Ok sure, I asked it because jsdelivr caches everything with access-control-allow-origin as "*" including package.json as well. This means Everything can be fetched/xmlhttped as text/plain, require statement replaced and rendered at client side within an iframe via script tag. This would greatly reduce complexity you need to deal on backend => you don't need to watch versions anymore and offload everything to client. I find it reasonable.
Yo Yehudi
@yochannah
Apr 17 14:49
prettymuch!