Skip to content

Use "requirejs" instead of "require" #155

@mangecoeur

Description

@mangecoeur

Wishlist item: some time ago I worked on a desktop wrapper for iPython - https://github.com/mangecoeur/ipython-desktop . One problem I ran into was that I embed the page into a nodeJs based desktop container (originally NodeWebkit, since shifted to github's Atom runtime). Node uses "require" to load modules, but this require is totally different from the AMD "requirejs" system. When you try to blend the browser and server code you get a name conflict which in theory could be fixed with some monkey patching, but in practice it's so flaky I never got it to work properly.

However, requirejs allows you to use requirejs function instead of require. From a quick overview of the code, it seems the root "require" function is only used in a few places - changing these might make the notebook more friendly to interact with from nodejs programs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions