# vue-cli_demo **Repository Path**: xiaoyuleilei/vue-cli_demo ## Basic Information - **Project Name**: vue-cli_demo - **Description**: 自己搭建的vue项目,里面包含分环境打包配置,自定义底部导航栏以及自己写的一些demo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-11-29 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # demo > A Vue.js project ## Build Setup ``` bash # 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 ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). ## 打包 npm run dev 开发环境 npm run test 测试环境 npm run pre 预发环境 npm run build 正式环境 ## 区分 正式站打包 ``` bash 利用gulp 和 gulp-run 将正式包生成一个压缩的zip文件 放在dist1文件夹下。压缩包名称带上日期及版本号等信息;如:(Philips_production_2019-12-2_v1.0.0.zip) 步骤: 1.cnpm install --save-dev gulp@4.0.2 2.cnpm install gulp-run --save-dev 3.在项目根目录下创建一个gulpfile.js,里面加上对应代码 4.在build.js里面加上相关配置,并创建一个外部命令,如下: var m=new run.Command("gulp zip"); m.exec(); 5.npm run build 即可 ```