Day 6 - Dependency Management with NPM
Housekeeping
- Early dismissal at noon
1. Introduction to Node and npm
Materials
- Video: NPM Crash Course by Traversy Media
- An introduction to the npm package manager
- Where does npm install the packages?
- Semantic Versioning using npm
Demo
Using a node package
- Intro to Lodash with simple string examples
- your
app.js
file, use lodash to do the following:- capitalize a string
- check for the same array elements in separate arrays
- set a script in
package.json
to runnode app.js
- your
2. First-time setup and initializing a project
Materials
- Anatomy of a
package.json
File on Digital Ocean - The
package.json
guide
Breakout Activity
In pairs, follow the steps in the following Gist for first-time setup and initializing your first project.
- Gist: npm - Initialize a new project
- initialize an npm project
- add lodash to the project
- read the lodash docs and test different methods
3. Practice: Installing packages
Materials
- Activity: Install
DayJS
from scratch - Activity: Install a javascript frontend framework and follow the docs to run a dev server
Software
NPM Basics
- Video: NPM Crash Course by Traversy Media
- An introduction to the npm package manager
- Where does npm install the packages?
- Semantic Versioning using npm
package.json
- Anatomy of a
package.json
File on Digital Ocean - The
package.json
guide