Feature: Fully offline export
Type of feature
✨ Feature
Current behavior
No response
Suggested feature
When building for example html and JS and then exporting it, ideally (especially for headless mode in CI-like use) there'd be a way to also get an output with all dependencies bundled into the one HTML file or perhaps the file plus the external modules copied locally. This would also simplify the prefix: import map complexity when integrating this output into other projects or deployments/automation, by being able to "vendor" the full deployment rather than inherit the complexity of pulling modules in from various 3rd party CDNs.
One use case is to have github files that are available locally. JSDelivr is good for deployment, but for dev steps, it forces a long cache unless you contact them, unless you update URLs with specific hashes of files as you update them... there's no default way to just use "latest" / @main for repos. So it could be easier for some users to export html + dependencies as a directory to rehost, or optionally one big html file with dependencies baked-in. It could also be useful to switch back to JSDelivr for prod deployments, and local paths / local github repos during dev (which can be loaded in via parent contexts using the SDK also...) Thanks
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributing Docs
- [X] I agree to follow this project's Contribution Docs
hi @aehlke
so there are different points here:
In case you need to use (frequently updated) scripts that you push to GitHub, and want to get the latest version, push to a gh-pages branch. This triggers deploy to GitHub pages, and you can import from there. The deploy feature in LiveCodes works that way.
If you want to get it from a CDN with shorter cache, may be try https://statically.io/
Cache Control
All files will be cached on the CDN for 1 year, except for these listed branch that are cached for only 1 day:
main master dev develop gh-pages
from: https://statically.io/docs/using-staticzap/
Exporting a full bundle for dependencies is not a straight forward feature. It is not currently in the scope of LiveCodes. Having said that, rollup and esbuild can run in the browser. May be this feature can be added later. This is not in the near future.
May be try: https://bundlejs.com/ Bundlejs has an API which you can use directly in LiveCodes to import modules from. https://twitter.com/jsbundle/status/1634455567321255936?s=20
Let's just leave this issue open, till we decide about bundling as a feature.