Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulate node's require #15

Open
daurnimator opened this issue Mar 27, 2017 · 1 comment
Open

Emulate node's require #15

daurnimator opened this issue Mar 27, 2017 · 1 comment

Comments

@daurnimator
Copy link

daurnimator commented Mar 27, 2017

It would be nice to be able to have lua load node.js modules on the fly.
i.e. runtime:require("../foo.js").

  • It should take care of relative paths etc.
  • It should create the node.js module object
  • It should interpret package.json to find the 'main' module.
@daurnimator
Copy link
Author

Might be able to work from the actual node implementation? https://github.com/nodejs/node/blob/master/lib/module.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant