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

Add a page for the Node.js-like module loader #124

Open
svaarala opened this issue May 26, 2016 · 0 comments
Open

Add a page for the Node.js-like module loader #124

svaarala opened this issue May 26, 2016 · 0 comments

Comments

@svaarala
Copy link
Owner

svaarala commented May 26, 2016

Node.js module loader is packaged as an extra (svaarala/duktape#796), add a proper, verbose howto for it. Rename the existing module howto page so that it's clear it's referring to the Duktape 1.x built-in module framework (which is also available for Duktape 2.x).

Some topics to cover:

  • Getting started minimal example
  • Properties of the module object, and comments on any differences to the Node equivalent; maybe showing an expanded example module object would be useful for illustration
  • Implementing a basic Node-like resolve mechanism
  • Implementing a basic load mechanism
  • Resolve and load in both C and Ecmascript
  • Integrating transpiling into module loading, this seems to interest a lot of people, and e.g. the Babel performance issues are worth noting (perhaps a module loader could, for example, perform hash- or timestamp-based caching)
  • Loading DLLs
  • Loading statically linked native code

Whenever it's obvious, it could just link to the Node.js API of course.

Page link proposal: http://wiki.duktape.org/HowtoNodejsModules.html.

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