Useful Websites NPM Homepage/Search
Total Page:16
File Type:pdf, Size:1020Kb
Useful Websites Useful Websites NPM Homepage/Search https://www.npmjs.com/ Node.js Homepage/Download https://nodejs.org/en/ NPM Documentation https://docs.npmjs.com/ Node.js Documentation https://nodejs.org/api/ Useful Commands Useful Commands Version npm –v Version node -v Update npm npm i –g npm Node shell node Project quick-start npm init -y Run a file node {myFile}.js Docs npm -h Command Docs Npm {command} -h package.json Example { Package Management “name”:”npm_node_reference_sheet”, Install Global Package npm i –g {package} “version”:”1.0.0”, “description”:NPM/Node cheat sheet”, List Outdate Globals npm outdated -g “main”:”index.js”, Delete Global npm un –g {package} “scripts”:{ Update Global npm up -g “test”:”echo \”Unspecified\” && exit 1” Install Dependency npm i {packageNane} }, npm i –D {package} “keywords”:[”npm”,”node”,”cheat sheet”], Install Development Dep. “author”:”Trace Sinclair”, Install Optional Dep. npm i –O {package} “license”:”MIT” Install package version npm i } {package}@{version} npm s {term} Search for a package package.json Attributes name Unique name, no upper case Project Functions version Semantic Version npm i Install Dep and Dev Dep description Package description Install only Dep npm i --production keywords Array of terms for search engines homepage The URL to the project homepage Running Package Scripts bugs The URL to the projects issue tracker Run scripts.start npm start license Licensing and restrictions Run scripts.test npm test author Name/email/URL of author Run scripts.stop npm stop contributor Array of Run scripts.{myScript} npm run {myScript} contributors(Name/email/URL) files Array of file patterns for installing Useful Packages main The main entry point of the package nodemon Development file watching tool bin Path to executables for PATH inclusion express.js Server routing man pm2 Process Manager Single or multiple Man pages directories socket.io Socket functionality Indicate the structure of your package repository gulp Task Runner Specify the place where your code webpack Module Bundler lives scripts babel ES Transpiler Dictionary of defined scripts to run mocha Test Framework config Set of parameters available in scripts passport User Authentication dependencies Packages required for production and nodemailer Email sending development use karma Test Runner devDependencies Packages used during development eslint Code Quality ie: compiling, testing, documentation nsp Node Security Platform peerDependencies Compatibility related nequalize SQL DB access packages/version, usually used for mongoose Mongo Access plugins optionalDependencies Optional dependencies, install will not fail if unable to download, and code should handle the missing package engines Specify the Node version compatibility os Specify OS compatibility cpu Specify CPU architecture compatibility private Flag to indicate if NPM can publish publishConfig Config overrides when publishing .