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

doc: add examples for implementing ESM #33168

Closed
wants to merge 3 commits into from

Conversation

rosaxxny
Copy link
Contributor

Fixes: #28060

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation. labels Apr 30, 2020
@addaleax
Copy link
Member

@nodejs/modules-active-members

Copy link
Member

@GeoffreyBooth GeoffreyBooth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seems to be adding an example explaining how import and export work in JavaScript in general, not particular to Node. I thought our general rule was that the Node docs only describe things specific to Node; they're not a general JavaScript tutorial like MDN. See #31479.

It's fine to add links to MDN, but we shouldn't be duplicating that resource.

@bmeck
Copy link
Member

bmeck commented May 1, 2020

I think having a small example is fine, but if we could link to MDN like @GeoffreyBooth states as well it would give people a place to get a more in depth understanding.

doc/api/esm.md Outdated Show resolved Hide resolved
doc/api/esm.md Outdated Show resolved Hide resolved
@rosaxxny
Copy link
Contributor Author

@GeoffreyBooth @bmeck There are links to MDN (for import and export) in the preceding paragraph.

@dnalborczyk @aduh95 Fixed.

Feedback is appreciated. Thanks!

@addaleax
Copy link
Member

Landed in 4780493

addaleax pushed a commit that referenced this pull request May 14, 2020
Fixes: #28060

PR-URL: #33168
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
@addaleax addaleax closed this May 14, 2020
codebytere pushed a commit that referenced this pull request May 16, 2020
Fixes: #28060

PR-URL: #33168
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
@codebytere codebytere mentioned this pull request May 18, 2020
codebytere pushed a commit that referenced this pull request Jun 7, 2020
Fixes: #28060

PR-URL: #33168
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
codebytere pushed a commit to codebytere/node that referenced this pull request Jun 9, 2020
Fixes: nodejs#28060

PR-URL: nodejs#33168
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
@codebytere codebytere mentioned this pull request Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esm modules documentation doesn't describe how to implement a module
7 participants