命令
npm init
生成package.json
npm start
启动模块
npm config list
查看所有配置
npm config get
查看配置
npm config rm
删除配置
npm config set
设置配置,其中key有registry(源镜像)、proxy、http-proxy、https-proxy
npm publish
发布模块
npm install
npm install 自动安装devDependencies的插件到node_modules下
npm install 本地安装
npm install @指定版本
npm install -g 全局安装
npm install -S安装到dependencies(生产阶段依赖)
npm install -D安装到devdependencies(开发阶段依赖)
npm update
更新模块
npm uninstall
卸载模块
npm search
查看某个模块是否存在
npm run
运行脚本
npm help
查看所有或指定命令的使用帮助
npm list -g --depth 0
查看安装的全局包