Please enable JavaScript.
Coggle requires JavaScript to display documents.
Modern JavaScript - Coggle Diagram
Modern JavaScript
package manager (npm)
2010
help automate the process of downloading and upgrading libraries
yarn (2016)
made for node.js
node modules
command line
npm install
$npm init
package.json
configuration
JavaScript module bundler (webpack)
CommonJS
no access to the file system
require
**dist/main.js
--mode=development
--mode=production
a build step to create a final output that is browser compatible
"devDependencies"
webpack.config.js
transpilling code for new language features
babel
core / present-env / loader
require → import
build performance
minifying
task runner
Grunt, Gulp
package.json
build / watch
$ npm run build
serve
add an external library
moment.js
$ npm install moment --save
node_modules/moment/min/moment.min.js
"dependencies"
ecosystem
rapid growth
old-school
manually downloading and linking files