diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2019-08-21 12:03:00 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-23 14:04:09 -0700 |
commit | 9d21b0395cc248a0e5537a11cc84f61919eccca6 (patch) | |
tree | c98e82742943e872b8544ac1ced20108de7a4512 /doc/api/esm.md | |
parent | 53816cce699d02fb28a49b258e1fbc474568bbf8 (diff) | |
download | android-node-v8-9d21b0395cc248a0e5537a11cc84f61919eccca6.tar.gz android-node-v8-9d21b0395cc248a0e5537a11cc84f61919eccca6.tar.bz2 android-node-v8-9d21b0395cc248a0e5537a11cc84f61919eccca6.zip |
doc: fix nits in esm.md
* ```mjs -> ```js as our linting of doc code fragments
does not recognize this tag, IIRC.
* Add semicolons to a code fragment.
* Fix ASCII sorting in bottom references.
PR-URL: https://github.com/nodejs/node/pull/29242
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Diffstat (limited to 'doc/api/esm.md')
-rw-r--r-- | doc/api/esm.md | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/api/esm.md b/doc/api/esm.md index 277f5cf830..159dcc678c 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -339,9 +339,9 @@ from `data:text/javascript,import "./foo";` will fail to resolve since there is no concept of relative resolution for `data:` URLs. An example of a `data:` URLs being used is: -```mjs -import 'data:text/javascript,console.log("hello!");' -import _ from 'data:application/json,"world!"' +```js +import 'data:text/javascript,console.log("hello!");'; +import _ from 'data:application/json,"world!"'; ``` ## import.meta @@ -894,18 +894,18 @@ $ node --experimental-modules --es-module-specifier-resolution=node index success! ``` +[CommonJS]: modules.html +[ECMAScript-modules implementation]: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md +[ES Module Integration Proposal for Web Assembly]: https://github.com/webassembly/esm-integration +[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md [Terminology]: #esm_terminology +[WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script [`data:` URLs]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs [`export`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export -[`import`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import [`import()`]: #esm_import-expressions [`import.meta.url`]: #esm_import_meta +[`import`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import [`module.createRequire()`]: modules.html#modules_module_createrequire_filename -[CommonJS]: modules.html -[ECMAScript-modules implementation]: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md -[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md -[special scheme]: https://url.spec.whatwg.org/#special-scheme -[WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script -[ES Module Integration Proposal for Web Assembly]: https://github.com/webassembly/esm-integration [dynamic instantiate hook]: #esm_dynamic_instantiate_hook +[special scheme]: https://url.spec.whatwg.org/#special-scheme [the official standard format]: https://tc39.github.io/ecma262/#sec-modules |