sudo npm install -g vue-cli
sudo npm install -g webpack
vue init webpack test
init:是指当前路径下
test:项目名(文件夹民)
安装过程当中除了 Install vue-roter?(即路由配置安装)输入y;其余都选择n;(以下图)
html
运行项目
进入项目目录vue
cd test npm run dev
项目目录结构分析
文件解释:
build:配置了webpack的基本配置,开发环境配置、生产环境配置;
config:配置了路径端口值等;
node_modules:配置依赖的模块;
src:放置组件和入口文件;
static:放置静态资源文件;
index.html:为文件入口node