##Purpose
To learn basic configuration of RequireJS and require.config.
##Why RequireJS
RequireJS is useful for building modularized enterprise JavaScript applications.
- we no longer have to control file loading, RequireJS does it elegantly for us
- creation of modules (even though ES6 provides module loading, RequireJS came prior and is very stable)
- lazy loading of app resources makes enterprise apps lightweight (incrementally loading things as needed)
##Project structure setup
npm install bowerbower inittouch .bowerrc(then open it and add this)bower install requirejs --savetouch index.htmlmkdir js && cd jstouch main.jsmkdir modulescd ..
How that should look like:
├── bower.json
├── index.html
└── js
├── libs
│ └── requirejs
│ ├── LICENSE
│ ├── README.md
│ ├── bower.json
│ └── require.js
├── main.js
└── modules
##Implementing KnockoutJS