User Tools

Site Tools


Sidebar

Go Back

Refresh

You are not allowed to add pages

Direct Link

library:web:vue_misc

This is an old revision of the document!


VUE Misc

1. 安装

  • 安装 node 环境(包含 npm包管理器)
  • 安装 vue cli 脚手架
  • 更换淘宝镜像
  • 初始化第一个vue项目

1.1 安装 node 环境

# For MACOS

brew install node
# 安装过程日志 ...

# For Windows
download from https://nodejs.org/zh-cn/download/, and install

# Check it
node -v
v16.4.2

npm -v
7.18.1

1.2 安装 vue cli 脚手架

npm install -g vue

vue -V
2.9.6

1.3 更换淘宝镜像

npm install -g cnpm –registry=https://registry.npm.taobao.org
cnpm install -g vue-cli

1.4 初始化第一个vue项目

vue init webpack webapp_test

1.5 测试

cd <webapp_test>
npm run dev

打开 http://localhost:8080

2. 升级Node.js

npm cache clean -f
npm install -g n

3. 搭建测试

# install http server

npm install http-server -g

http-server -v
v14.1.1
library/web/vue_misc.1662697993.txt.gz · Last modified: 2022/09/09 12:33 by lhaosen