Interective Guide to Package.json - http://browsenpm.org/package.json#contributors
-
-
Save nathakits/90cd237f178e053b587b84235c8553ff to your computer and use it in GitHub Desktop.
Create package.json: npm init -y
Install package & save in dependencies: npm i -S <insert_name_of_package_here>
Install package & save in devDependencies: npm i -D <insert_name_of_package_here>
Install package globally: npm i <insert_name_of_package_here> -g
Uninstall package: npm r <insert_name_of_package_here>
Uninstall global package: npm r <insert_name_of_package_here> -g
Uninstall package & remove from dependencies: npm r -S <insert_name_of_package_here>
Uninstall package & remove from devDependecies: npm r -D <insert_name_of_package_here>
Run Script: node <name_of_script>
Check for outdated packages: npm outdated
Get list of installed packages: npm ls
Go to package rep0: npm repo <insert_name_of_package_here>
Go to package website: npm home <insert_name_of_package_here>
Check version of package: npm view <insert_name_of_package_here> version
Check if packages are installed in package.json: npm prune