For example, ~1.5.1 permits anything from that version up to but not including 1.6.0 to be installed when npm update is run. The more conservative tilde ( ~) character pins the package to the minor version. For example, ^1.5.1 permits anything from that version up to but NOT including 2.0.0 to be installed when npm update is run. This pins the package to its major version number. If you add the -production flag or have the NODE_ENV environment variable set to production, packages specified as devDependencies in package.json will also be removed.īy default, npm references package version numbers with the caret ( ^) character when installing a package with -save or -save-dev. You can npm uninstall each separately or remove them all with: npm prune Npm list reports when you have extraneous packages installed - those which are no longer referenced in your package.json file. Similarly, you can open a package’s GitHub repository: npm repo This only works if your system can open a browser – it will fail on OS Server editions. Limit the output to top-level-only packages using: npm list -depth = 0Ī package homepage can be opened with: npm home The list shows everything: packages, sub-packages, sub-packages of sub-packages etc. ![]() ( ls, la and ll can be used as aliases for list). ![]() You’ve chosen your packages and installed the dependencies.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |