-
安装node.js
要求npm版本在6.0以上否则无法运行run命令
-
npm install vue
执行
npm install vue
命令安装vue -
全局安装 vue-cli
npm install --global vue-cli
-
创建一个基于 webpack 模板的新项目
vue init webpack 项目名称
-
安装依赖
cd my-project
npm install
-
运行vue项目
npm run dev
first vue
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
#vue的目录结构#