4 ms·
Very cool, I'm building something similar (with a larger scope) [0] (it also has one-file exports, but it does load stuff from a CDN so it's not as contained to
by protoduction 5y ago
Very cool, I'm building something similar (with a larger scope) [0] (it also has one-file exports, but it does load stuff from a CDN so it's not as contained to a single file as this project is.)
If you're looking for next steps: You can actually run user code using `import`, which will allow your users to import code from external websites using familiar `import {x} from "https://some-url.com/bla.js https://some-url.com/bla.js"` syntax at the top of cells. Here's how:
const exportsInCell = await import(URL.createObjectURL(new Blob([USER_CODE], { type: "text/javascript" })));
And with some transpilation you can support top-level await in eval [1]. Just some pointers!
[0]: https://starboard.gg https://starboard.gg & https://github.com/gzuidhof/starboard-notebook https://github.com/gzuidhof/starboard-notebook
[1]: https://github.com/gzuidhof/starboard-notebook/blob/master/src/cellTypes/javascript/precompileModule.ts https://github.com/gzuidhof/starboard-notebook/blob/master/s...
- timcwinkler 5y agoYou project looks very interesting. Shared idea of programming in the browser, but much more ambitious. I have experimented with async/await with js+help.html. The import pointer is very interesting, thank you for that. My impulse is to try to write a function to import a code from a URI.
- timcwinkler 5y agoI recreated my mfib example as a Starboard notebook: https://starboard.gg/timcwinkler/mfib-nC0Am5G https://starboard.gg/timcwinkler/mfib-nC0Am5G Very nice looking! One difference from js+help.html, with it outputs are also saved.
- Fractal_HQ 5y agoI never get an email confirmation when I try to sign up for Starboard :( Edit: Suddenly got both!