
Master course navigation by exploring lecture, practice, and two-video challenge videos with diagrams and slides, while using the video player's speed, quality, and lecture list controls.
Let's explore together some popular NPM packages
Learn to create and configure a package.json in the root of your project, using npm init or yarn init to set name, version, author, and dependencies.
install the semver package as a project dependency and practice version checks using helper methods like valid, greater than, and less than, noting its use in Babel.
Install the semver package with npm or yarn, inspect its package.json and bin, and demonstrate methods like valid, greater than, coerce, range, satisfies, inc, and parse to manage versions.
Practice explains how to manage npm dependencies by installing and removing packages, distinguishing dependencies from development dependencies, and using npm install --production to install only dependencies, and understanding node_modules behavior.
Embed moment.js as a browser dependency in a single index.js file, format the clock time in the browser, and observe that browser apps ignore node_modules and package.json.
Understand when to classify NPM packages as dependencies or development dependencies for browser apps and public packages, and learn how bundling affects final builds.
Learn to install a specific package version with NPM install package@version, audit for vulnerabilities with NPM audit, and revert to the current stable release using the moment example.
Understand how the log file is created automatically since 5.0.0, updated with npm installs, committed with package.json to lock exact dependencies, while excluding node_modules and using dev true flags.
The log file ensures consistency of all dependency versions, including child dependencies, and is created and updated automatically; commit it to source control to benefit when updating packages.
Use the npm update command to refresh project dependencies within semver rules, updating package.json and the log file, and install changes in node_modules; also learn updating a single package.
Learn to initialize a new npm project, install two older package versions—one with --save-exact and one without—then update dependencies with npm update.
Explore npm scripts, including default npm start and npm test, and learn to add a start script in package.json to run node files like server.js.
Add a press start script that runs before npm start, install the colors package, require it in src/press start js, and print a green console.log message saying application is starting.
Install npm-run-all as a development dependency, add an all script to package.json, and run npm run all --parallel to execute start, custom one, and custom two in parallel.
In this course I will explain you what is NPM and how it is used.
This course is designed to provide students with a comprehensive understanding of NPM, the Node.js package manager. Students will learn how to use NPM to manage Node.js packages and create their own packages.
The course begins with an overview of NPM and its role in the Node.js ecosystem. Students will learn how to install and configure NPM, including setting up a new Node.js project and managing project dependencies using NPM.
The course then dives into more advanced NPM features, including package versioning and semantic versioning.
Throughout the course, students will gain hands-on experience working with NPM through a series of practical exercises and labs. By the end of the course, students will have a solid understanding of NPM and be able to effectively manage Node.js packages in real-world scenarios.
Learning Objectives:
Understand NPM and its role in the Node.js ecosystem
Install and configure NPM and create a new Node.js project
Manage project dependencies using NPM
You will learn how to initialize new project, how to install new dependencies and explore their child dependencies.
We will also discuss what is Semantic Versioning and what Major, Minor and Patch versions mean.
You will also understand what is the purpose of the package-lock.json file.
I will explain you what is the purpose of the NPM scripts and how they should be used. We will talk about built-in NPM scripts and custom script. Also we will combine several NPM scripts in a one using npm-run-all external package.
You will understand what is executable script and what is the purpose of the .bin folder in the node_modules folder. I will explain you what is shebang line and how it is used on the Unix-based system and on Windows.
After this course you will gain a deep knowledge about NPM and learn how to use it on practice.