Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed npm Basics!
You have completed npm Basics!
Preview
Semantic Version is a system for communicating changes in versions of projects.
Further Reading
Semantic Versioning
MAJOR.MINOR.PATCH-
^before a version number means install up to the latestMINORrelease.- e.g.
^1.1can install1.3if available but not2.0
- e.g.
-
~before a version number means install up to the latestPATCHrelease.- e.g.
~2.0.1can install2.0.9if available but not2.1.0
- e.g.
Terminal Commands
- Clear the screen
clear
npm Command Line Usage
-
See list of commands
npm
-
Installing a packages from
package.jsonnpm install
-
Check for outdated packages
npm outdated
-
Update packages in your project
- For local packages
npm update - For global packages
npm update <package name> -g
- e.g.
npm update http-server -g
- e.g.
- For local packages
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
a combination of the name of the package
followed by a version number.
0:00
An individual package can
have hundreds of versions and
0:01
between these versions there
may be small or large changes.
0:06
Some versions may be fixes of
bugs from previous versions.
0:10
Some newer versions would break projects
that rely on previous versions.
0:15
We can gather all of this
information from the version number.
0:21
[SOUND] Package version numbers, consist
of three numbers, separated by periods.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up