搭建vue项目

1.安装node.js(直接下载安装也行) http://nodejs.cn/download/

curl -sL https://rpm.nodesource.com/setup_8.x | bash -

注:这里我是安装的v8.11.3版本的,8.x表示v8版本

sudo yum install -y nodejs

2、验证node版本

node -v 结果如 v8.11.3 格式则成功

3、安装淘宝镜像

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

4、安装全局的脚手架 vue

npm install vue-cli - g 脚手架2

npm install @vue/cli - g 脚手架3

5、安装依赖

版本2 新建一个文件夹 cd到这个文件夹下 npm install一下 再npm run dev

版本3 vue create 文件夹名 npm install npm run dev

6、创建V3项目的时候,选用自定义配置,在选用babel、routeres、CSS Pre-processor 后再加上Linter / Formatter配置的话,就无法热更新。如果没有选用Linter / Formatter配置则正常

你可能感兴趣的:(搭建vue项目)