Merge pull request #2086 from atilacamurca/npm-cheatsheet

New Npm Cheat Sheets
master
Zaahir Moolla 2016-01-29 20:07:58 -05:00
commit dae2088d31
1 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,83 @@
{
"id": "npm_cheat_sheet",
"name": "NPM",
"description": "Command Line Interface (CLI) commands for npm",
"metadata": {
"sourceName": "NPM Docs",
"sourceUrl": "https://docs.npmjs.com/#cli"
},
"template_type": "terminal",
"section_order": [
"Getting Started",
"Installing Packages",
"Package Details"
],
"sections": {
"Getting Started": [
{
"val": "Interactively create a package.json file",
"key": "npm init"
},
{
"val": "Install packages based on package.json file in the current folder",
"key": "npm install"
},
{
"val": "Search the registry for packages matching the search terms",
"key": "npm search <term>"
},
{
"val": "Updates all the packages to the latest version, respecting semver",
"key": "npm update -g <package_name>"
},
{
"val": "Show help for the especific command",
"key": "npm help <command>"
}
],
"Installing Packages": [
{
"val": "Install the latest version of a package",
"key": "npm install <package_name>"
},
{
"val": "Install an especific version of a package",
"key": "npm install <package_name>@<version>"
},
{
"val": "Install a package globally, usualy for command line use (On *nix requires sudo)",
"key": "npm install -g <package_name>"
},
{
"val": "Install a package and append it in the dependencies section of your package.json",
"key": "npm install --save <package_name>"
},
{
"val": "Install a package and append it in the devDependencies section of your package.json",
"key": "npm install --save-dev <package_name>"
},
{
"val": "Install a package and append it in the optionalDependencies section of your package.json",
"key": "npm install --save-optional <package_name>"
}
],
"Package Details": [
{
"val": "Show the docs for a package in a web browser",
"key": "npm docs <package_name>"
},
{
"val": "Show the issues for a package in a web browser",
"key": "npm bugs <package_name>"
},
{
"val": "Open package repository page in the browser",
"key": "npm repo <package_name>"
},
{
"val": "Print all the versions of packages that are installed, as well as their dependencies",
"key": "npm ls"
}
]
}
}