Skip to content

Import local notebooks #3

@asg017

Description

@asg017

Right now, this just uses the defaultResolver of the unofficial compiler, meaning it imports from observablehq.com notebook directly.

But, it would be cool to support local notebooks that are in your file system. For example, you could have:

$ ls
main.notebook.js other.notebook.js

Then, in main.notebook.js:

import {test} from "./other.notebook.js"

test should now have the test variable from the local other.notebook.js.

This would involve creating a new resolve function and passing it into the Compile constructor. The defaultResolver is a good example to work off of.

Maybe it should be a setting too - since maybe this is a security concern?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions