快速入门
- 01 - npm 是什么?
- 02 - 如何安装 npm 并管理 npm 版本
- 03 - How to prevent permissions errors
- 04 - 如何安装本地包
- 05 - Working with package.json
- 06 - 如何更新本地安装的包
- 07 - 如何卸载本地安装的包
- 08 - 如何安装全局包
- 09 - 如何更新全局安装的包
- 10 - 如何卸载全局安装的包
- 11 - 如何创建 Node.js 模块
- 12 - How to publish & update a package
- 13 - 如何使用语义化版本
- 14 - How to work with scoped packages
- 15 - How to label packages with dist-tags
- 16 - How to use two-factor authentication
- 17 - How to work with security tokens
- 18 - How to change profile settings from the CLI
19 - Understanding packages and modules
私有模块
- 02 - Downloading modules to CI/deployment servers
03 - Docker and private modules
故障排除
- 02 - Try the latest stable version of npm
- 03 - 如果 npm 损坏了
- 04 - Try clearing the npm cache
-
npm 用法
coding-style npm’s “funny” coding style
- config More than you probably want to know about npm configuration
- developers Developer Guide
- disputes Handling Module Name Disputes
- orgs Working with Teams & Orgs
- registry The JavaScript Package Registry
- removing-npm Cleaning the Slate
- scope Scoped packages
- scripts How npm handles the “scripts” field
semver The semantic versioner for npm
命令行
access Set access level on published packages
- adduser Add a registry user account
- audit Run a security audit
- bin 显示 npm 的 bin 文件夹的路径
- bugs Bugs for a package in a web browser maybe
- build 构建一个包
- bundle 此命令已被删除
- cache Manipulates packages cache
- ci Install a project with a clean slate
- completion Tab Completion for npm
- config Manage the npm configuration files
- dedupe Reduce duplication
- deprecate 作废指定包的指定版本
- dist-tag Modify package distribution tags
- docs Docs for a package in a web browser maybe
- doctor Check your environments
- edit Edit an installed package
- explore Browse an installed package
- help Get help on npm
- help-search Search npm help documentation
- hook Manage registry hooks
- init create a package.json file
- install Install a package
- install-ci-test
- install-test
- link Symlink a package folder
- logout Log out of the registry
- ls List installed packages
- npm javascript package manager
- outdated Check for outdated packages
- owner Manage package owners
- pack Create a tarball from a package
- ping Ping npm 注册表
- prefix 显示(目录)前缀
- profile Change settings on your registry profile
- prune 移除无关的包
- publish Publish a package
- rebuild 重新构建包
- repo 在浏览器中打开指定包的源码仓库页面
- restart Restart a package
- root 显示 npm 根目录
- run-script Run arbitrary package scripts
- search Search for packages
- shrinkwrap 锁定依赖包的版本
- star 标记你所喜欢的包
- stars 查看 star 过的包
- start start 脚本
- stop stop 脚本
- team Manage organization teams and team memberships
- test test 脚本
- token Manage your authentication tokens
- uninstall Remove a package
- unpublish Remove a package from the registry
- update Update a package
- version Bump a package version
- view View registry info
whoami 显示 npm 用户名
配置 npm
folders Folder Structures Used by npm
- npmrc The npm config files
- package-lock.json A manifestation of the manifest
- package-locks An explanation of npm lockfiles
- package.json Specifics of npm’s package.json handling
shrinkwrap.json A publishable lockfile
npm 服务
npm Orgs - the npm Orgs documentation site
npm Enterprise - the npm Enterprise documentation site
一、快速入门:
1、npm是什么?
npm 由三个独立的部分组成:
- 网站
- 注册表(registry)
- 命令行工具 (CLI)
网站 是开发者查找包(package)、设置参数以及管理 npm 使用体验的主要途径。
注册表 是一个巨大的数据库,保存了每个包(package)的信息。
CLI 通过命令行或终端运行。开发者通过 CLI 与 npm 打交道。