This repo is a collection of simple demos of JS modules.
These demos are purposely written in a simple and clear style. You will find no difficulty in following them to learn the basics.
Live editing and demo on StackBlitz ⚡️
Locally: Clone the repo.
$ git clone https://github.com/rahuljain936/JS-modules.gitInstall the dependencies.
$ cd JS-modules
$ npm installNow, play with the source files under the repo's demo* directories.
$ cd demo0*-**
$ npm run start- Demo01: CommonJS Module
- Demo02: ES6 Module
- Demo03: CommonJS modules inside ES6 Node Module
- Demo04: CommonJS modules inside ES6 Browser Module
- Useful links
Demo01: CommonJS Module (source)
$ cd demo01-CJS
$ npm run startDemo02: ES6 Module (source)
$ cd demo02-ES6
$ npm run startDemo03: CommonJS modules inside ES6 Node Module (source)
$ cd demo03-ES6-CJS-NODE
$ npm run startDemo04: CommonJS modules inside ES6 Browser Module (source)
$ cd demo03-ES6-CJS-BROWSER
$ npm run startCheck localhost:1111 in browser
MIT