Vue.js开发环境搭建的介绍
包含了最基础的Vue.js的框架,包含了打包工具和测试工具,开发调试的最基本的服务器,不需要关注细节,只需关注Vuejs对项目的实现

npm在国内的网络使用较慢,所以推荐下载安装淘宝的镜像

1:

2:安装cnpm -v

vue没有被找到
3:

4:再次输入Vue的时候,我们会看到

接下来如何使用命令行工具?看官网

1: 我们在当前目录下生成一个

以下信息可选填

2:项目初始化完成,我们发现目录下多了一项文件夹,大概长这个样子


不能直接看项目,项目不是独立存在 ,跟其他的库是有千丝万缕的联系的,所以要下载依赖包,可以直接在根目录下查看和安装,我们看一下

查看到信息和这套模板里面带的一些依赖

这不是重要的,重要的是,cnpm install 这个命令,把所有的依赖都安装到当前的目录下

接下来使用命令行启动服务器 npm run dev

监听的端口是8080

搭建成功,在src文件夹底下进行剩下的开发