代码改变世界

npm

2017-02-19 11:23  xchit  阅读(208)  评论(0编辑  收藏  举报

npm-v 检查版本

npm list --depth=0 -global 查看npm 安装的全局的包

 npm config list 查看npm配置

npm install 安装模块

npm uninstall 卸载模块
npm update 更新模块
npm outdated 检查模块是否已经过时
npm ls 查看安装的模块
npm init 在项目中引导创建一个package.json文件
npm help 查看某条命令的详细帮助
npm root 查看包的安装路径
npm config 管理npm的配置路径
npm cache 管理模块的缓存
npm start 启动模块
npm stop 停止模块
npm restart 重新启动模块
npm test 测试模块
npm version 查看模块版本
npm view 查看模块的注册信息
npm adduser
npm publish 发布模块
npm access 在发布的包上设置访问级别
npm package.json的语法

 

@angular/cli
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
ng serve --prod --aot

npm install -g cnpm --registry=http://registry.npm.taobao.org