Closed RandomFractals closed 3 years ago
Added support for the new Notebook paradigm and tested by importing https://observablehq.com/@observablehq/recommended-libraries into an OJS and OMD.
oh, so the obsrvablehq libs and yours already do that? and we don't have to scan code cells or inject those default imports?
Anyhoo, thanks for the quick patch!
Yea it pretty much just works when I bumped my versions - I did need to add support for the notebook cell types...
Hi Gordon,
First of all, congrats on crossing 1K installs in VS marketplace.
I wanted to request this auto-import feature for the new OJS notebooks. @mbostock & ObservbableHQ team recently simplified how the above mentioned libraries are used on Observable site.
In order to import them into OJS vscode extension we'd need to add them too when
.ojs
and.omd
files are created and code cells reference them.I think we can just scan notebook cells code on import and add them at the end of the imported notebook OJS/OMD code.
See Mike's recommended libraries notebook for the latest versions to use:
https://observablehq.com/@observablehq/recommended-libraries
and this example I created recently: https://github.com/RandomFractals/Chicago-transportation-notebooks/blob/main/notebooks/observable/chicago-traffic-tracker.ojs
I had to add them manually in my OJS Imports section, but I think that process can be automated with your OJS notebook importing and loading tool.