Vue3.x 脚手架安装以及使用

3 篇文章 0 订阅
3 篇文章 0 订阅

一、使用npm查看当前源、切换淘宝镜像、切换官方源

  1. (1)npm查看当前源: npm get registry
  2. (2)npm设置淘宝镜像源: npm config set registry http://registry.npm.taobao.org
  3. (3)npm设置官方源: npm config set registry http://www.npmjs.org

二、使用nrm查看和切换镜像

  1. 1、首先通过npm安装nrm: npm install -g nrm
  2. 2、通过nrm查看和切换镜像源(命令):nrm ls 注意:下面的 * 表示当当前正在使用的源,
    3.* 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/
  3. 3、如果想要使用某一个,直接use,比如我要使用淘宝镜像的源: nrm use taobao

C:\Users\Administrator>npm install -g @vue/cli
D:\前端\code>vue create demo

三 Vue3.x 脚手架安装以及使用

  1. 1.先安装脚手架:npm install -g @vue/cli
  2. 2.创建项目:vue create demo(demo名字可以更改)
  3. 3.下面是相当于自定义脚手架创建的项目
    Vue CLI v5.0.8
    ? Please pick a preset: Manually select features
    ? Check the features needed for your project: Babel, TS, Router, CSS Pre-processors, Linter
    ? Choose a version of Vue.js that you want to start the project with 3.x
    ? Use class-style component syntax? No
    ? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes
    ? Use history mode for router? (Requires proper server setup for index fallback in production) No
    ? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass)
    ? Pick a linter / formatter config: Basic
    ? Pick additional lint features: Lint on save
    ? Where do you prefer placing config for Babel, ESLint, etc.? In package.json
    ? Save this as a preset for future projects? No
    ? Pick the package manager to use when installing dependencies: Yarn
  4. 4.创建好了之后会有这两个命令
    $ cd aria-admin
    $ yarn serve
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值