Npm Commands Cheat Sheet



Yarn cheat sheet

Getting Started

To begin working with Cheat Sheet source files: Run npm install to install the depencies listed in package.json; Run grunt to build the entire project; Run grunt assemble to build the templates; Run grunt less to compile LESS files to CSS; Run grunt watch to watch source files for changes and re-build continuously. Not part of the npm cli, but I find npm-check a lot easier than npm outdated. Instead of only listing the outdated depenencies, it can print out commands to copy-paste to update each outdated dependency, or use the interactive mode where you just mark the dependencies to update. The Gatsby cheat sheet has docs for top CLI commands & APIs all ready to print out. How to use gatsby-cli. The Gatsby CLI is available via npm and is installed globally by running npm install -g gatsby-cli. You can also use the package.json script variant of these commands, typically exposed for you with most starters.

Npm Commands Cheat SheetCommandsRoblox

List everything you have installed in the current directory

Search the registry for packages matching terms

Install a package

This command installs a package, or packages, and any packages thatit depends on in the current directory. If the package has a shrinkwrapfile, the installation of dependencies will be driven by that.

If no package.json exists, these options are ignored. If it exists, they'llupdate them if they are already there.

  • --save: Package will appear in your depedencies.
  • --save-dev: Package will appear in your devDependencies.
  • --save-optional: Package will appear in your optionalDependencies.
  • --global: Package will be installed globally (if you want to use it as a command line tool for example)

Uninstall a package, completely removing everything npm installed on its behalf

Update all the packages listed to the latest version (specified by the tag config). Also install missing packages

Update the global npm version

Display the README.md / documentation / npmjs.org page of a give library

Run package test suite, based on setup in package.json in

List outdated libraries compared to currently installed node_modules

Lock down dependency versions

Npm Commands Cheat Sheet Download

Develop

Npm Commands List

Asks you a bunch of questions, and then writes a package.json for you. If you already have a package.json file, it'll read that first, and default to the options in there.

Publish a package not under the default 'latest' tag