(1)VSCode开发工具

(2)nodejs开发环境,官方下载安装就可以(默认安装nodejs,npm包管理工具)

下载 | Node.js

(3)cnpm下载与安装

npmmirror 中国镜像站

sudo npm install -g cnpm --registry=https://registry.npmmirror.com

cnpm -v

cnpm@7.1.1 (/usr/local/lib/node_modules/cnpm/lib/parse_argv.js)
npm@6.14.16 (/usr/local/lib/node_modules/cnpm/node_modules/npm/lib/npm.js)
node@16.14.2 (/usr/local/bin/node)
npminstall@5.8.0 (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local 
darwin x64 20.6.0 
registry=https://registry.npmmirror.com

(4) 安装yarn

sudo npm install -g  yarn

yarn

yarn install v1.22.18
warning package.json: No license field
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
✨  Done in 3.92s.

(5)vue-cli脚手架

cnpm install vue-cli -g  或者下面的语法

sudo  cnpm install -g @vue/cli

vue -V

@vue/cli 5.0.4

(6) 创建并初始化一个Vue项目

vue create 项目名字(vue-manage)

vue init webpack  myvue

(7)启动一个vue项目

npm install

npm run dev

 或者

yarn serve

Logo

前往低代码交流专区

更多推荐