vue项目搭建

一.初始化vue项目
     1.环境初始化

      1.安装node,

      2.安装淘宝npm镜像提高下载速度。 npm install -g cnpm --registry=https://registry.npm.taobao.org

      3.安装vue脚手架vue-cli。 npm install -g vue-cli

      4  创建项目.创建一个基于 webpack 模板的新项目demovue init webpack demo

      【创建过程中会提示是否需要vue-router、eslint、unit tests等:

     【current directory ?  === Y
project  name 
description // 描述,不需要就回车
author // 作者  自己分配到的git账号
vue build ? ===  standalone 
install vue-router? === Y
user ESLint to lint your code ? ====Y
pick an ESLint preset ? ====Standard
set up unit tests   ====Y
 pick a test runner ===== jest
setup e2e tests with Nightwatch ? ===== Y
should we run ‘npm instll’for you after the project has  been  created?  ==== n

      5.切换到项目目录 cd demo

      6.下载安装依赖模块 cnpm install

       npm run lint   

       npm run test

      7.启动运行: npm run dev

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值