Javascript Roadmap Add module content (#1850)

* Add contents to javascript modules subsection 100-commonjs

* Add contents to javascript modules subsection 101-esm

* Update content/roadmaps/106-javascript/content/115-javascript-modules/100-commonjs.md

* Update content/roadmaps/106-javascript/content/115-javascript-modules/101-esm.md

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/1865/head^2
Will Featherston 2 years ago committed by GitHub
parent 885e21f5cc
commit a9f61adcfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      content/roadmaps/106-javascript/content/115-javascript-modules/100-commonjs.md
  2. 11
      content/roadmaps/106-javascript/content/115-javascript-modules/101-esm.md

@ -1 +1,9 @@
# Commonjs
# CommonJS
CommonJS modules are the original way to package JavaScript code for Node.js. Node.js also supports the ESModules standard used by browsers and other JavaScript runtimes, but CJS is still widely used in backend Node.js applications. Sometimes these modules will be written with a .cjs extension.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.freecodecamp.org/news/modules-in-javascript/#commonjsmodules'>Modules in Javascript: CJS Section</BadgeLink>
<BadgeLink colorScheme='yellow' basw2dgeText='Read' href='https://nodejs.org/api/modules'>Node.js documentation for CJS modules</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://blog.risingstack.com/node-js-at-scale-module-system-commonjs-require/'>How the CJS Module System Works</BadgeLink>
<BadgeLink colorScheme='purple' badgeText='Watch' href='https://www.youtube.com/watch?v=XTND4rjATXA'>How to Import and Export Modules in CJS</BadgeLink>

@ -1 +1,10 @@
# Esm
# ESModules
ESModules is a standard that was introduced with ES6 (2015). The idea was to standardize how JS modules work and implement these features in browsers. This standard is widely used with frontend frameworks such as react and can also be used in the backend with Node.js. Sometimes these modules will be written with a .mjs extension.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.freecodecamp.org/news/modules-in-javascript/'>Introduction to Modules in Javascript</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules'>Full ESM module overview from MDN</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/modules'>Full ESM module overview from js.info</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://nodejs.org/api/esm.html'>Node.js documentation for ESModules</BadgeLink>
<BadgeLink colorScheme='purple' badgeText='Watch' href='https://www.youtube.com/watch?v=cRHQNNcYf6s'>JavaScript ES6 Modules Simplified</BadgeLink>

Loading…
Cancel
Save