我们通过npm 可以很方便地下载js库,管理前端工程。

执行命令初始化 :npm init
如果想直接生成 package.json 文件,那么可以使用命令 npm init -y
设置镜像地址:npm config set registry https://registry.npm.taobao.org
查看npm配置信息 npm config list
npm install 安装依赖包的最新版,
如果安装时想指定特定的版本 npm install jquery@2.1.x
更新包 npm update 包名
全局更新 npm update -g 包名
卸载包 npm uninstall 包名
全局卸载 npm uninstall -g 包名


还没有评论,来说两句吧...