npm经常用到的一些命令
- npm -v
查看npm版本 - npm init(生成package.json说明书文件)
npm init -y(可以跳过向导,快速生成) - npm install
一次性把dependencies选项中的依赖项全部安装 - npm install -g 包名
安装全局模块 - npm install --save 包名
下载并且保存依赖项(package.json文件中的dependencies选项) - npm install --save 包名@1.0.0
安装指定版本的模块 - npm uninstall --save 包名
删除模块,同时也会把依赖信息全部删除 - npm cache clean:
清除缓存 - npm help
查看使用帮助