# alphakids_develop **Repository Path**: sl19940902/alphakids_develop ## Basic Information - **Project Name**: alphakids_develop - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-24 - **Last Updated**: 2021-03-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # alphakids > A Vue.js project ## 目录简介 ``` bash build ---------------- 构建相关 config --------------- 配置相关 src ------------------ 源代码 assets ----------- 打包静态的资源 components ------- 页面组件 js --------------- 页面逻辑 api ---------- 请求接口配置 utils -------- 工具对象和方法 router ----------- 路由配置 store ------------ 状态管理 styles ----------- 页面样式 App.vue ---------- 主组件 main.js ---------- 项目初始化逻辑 permission.js ---- 权限管理逻辑 static---------------- 不打包静态的资源 index.html ----------- 主页面 ``` ## Build Setup ``` bash # 安装依赖 npm install # 本机直接运行(默认开发环境) npm run dev # 各个环境下打包项目 npm run build # 默认开发环境 npm run build:dev # 开发环境 npm run build:prod # 生产环境 npm run build:test # 测试环境 npm run build:demo # 演示环境 规则如下: (1) npm run build:xx : 其中xx映射到 config/xx.env.js 环境配置文件 (2) npm run dev : 直接映射到 config/dev.env.js (3) 增加打包环境 : 新增 xx.env.js文件,在 package.json 的 scripts 字段,新设对应的命令行 (4) 在代码中可以通过 process.env.NODE_ENV 和 process.env.API_URL 获取环境配置参数 # 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 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).