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. 直接下载使用Vue

- 官网下载Vue.js文件 https://unpkg.com/browse/vue@3.0.11/dist/

3. 搭建测试

# install http server
npm install http-server -g

http-server -v
v14.1.1

http-server -p 8080
library/web/vue_misc.1662769867.txt.gz · Last modified: 2022/09/10 08:31 by lhaosen