• node-npm


    npm包管理工具,(类似java中maven)

    npm的命令

    • 【npm -v】查看npm的版本
    • 【nprm version】查看所有模块的版本
    • 【npm search 包名】搜索包
    • 【npm install/i 包名】安装包
    • 【npm install 包名 --save】 安装包并添加到依赖中
    • 【npm install 包名 -g】全局安装包(一般都是一些工具)
    • 【npm install 文件路径】 从本地安装
    • 【npm install 包名 -registry=地址】从镜像源安装
    • 【npm config set registry 地址】 设置镜像源
    • 【npm install】下载当前项目所依赖的包
    • 【npm remove/r 包名】删除包
    • 【npm remove 包名 --save】 删除包并在依赖中也删除
    • 【npm run build】打包

    使用 nrm 切换镜像源

    • 下载 nrm:npm install -g nrm
    • 查看可切换的镜像源: nrm ls (*表示正在使用的镜像源)
      npm -------- https://registry.npmjs.org/
      yarn ------- https://registry.yarnpkg.com/
      cnpm ------- http://r.cnpmjs.org/
    * taobao ----- https://registry.npm.taobao.org/
      nj --------- https://registry.nodejitsu.com/
      npmMirror -- https://skimdb.npmjs.com/registry/
      edunpm ----- http://registry.enpmjs.org/
    
    • 切换镜像源:nrm use 源名称 如:nrm use taobao
  • 相关阅读:
    nginx,php for window 7(64bit) install
    ret.concat.apply([],ret)
    JavaScript:constructor属性
    jquery 插件address
    学习笔记(C++)
    关于网站缓存设计的几点思考
    Ubuntu20.04 换源 Learner
    什么叫程序集
    c# 中堆和栈的区别
    命名空间和类的概念
  • 原文地址:https://www.cnblogs.com/xiaoaiying/p/14171018.html
Copyright © 2020-2023  润新知