終端cmd,在項目中輸入下面命令:
E:\Vue>vue init webpack vuedemo02
接著就會讓你輸入或者選擇一些是不是要的東西
? Project name vuedemo02(項目名稱)
? Project description A Vue.js project(描述,我默認了)
? Author simalinjia(作者名稱)
? Vue build (Use arrow keys)(我默認了)
? Vue build standalone(我默認了)
? Install vue-router? Yes(路由,我yes)
? Use ESLint to lint your code? No
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npmvue-cli · Generated "vuedemo02"
# Installing project dependencies ...
# ========================
–含義–
build—打包的配置文件文件夾
–webpack.base.conf.js(核心)
config—打包的配置
–index.js(核心)
src—開發項目的源碼
static—靜態資源
main.js—主入口文件
babelrc—es6解析配置文件,對語法
index—但頁面應用入口文件
packjson—基礎配置
editorconfig—編輯器配置