mesh-devtool
-
项目的简介以及用途
统一处理 mesh-website 里的 vue 项目的开发,打包,部署
inspire by Create-React-App
-
项目的开发环境配置,调试过程,项目的生产的配置,部署过程
在主项目中通过 lerna bootstrap 安装依赖
直接开发,无需打包
在主项目中通过 lerna publish 发布到 npm
-
项目的依赖的用途(每个依赖用一句话介绍)
"dependencies": {
"@timer/detect-port": "1.1.3", // 检查端口占用
"address": "1.0.1", // 获取本机 IP, MAC 和 DNS
"anser": "1.3.0", // ANSI sequences parser
"axios": "^0.16.2", // http Client
"babel-code-frame": "6.22.0", // 显示错误的代码以及位置
"blueimp-load-image": "^2.12.2", // load image 项目共有依赖
"blueimp-md5": "^2.4.0", // JavaScript MD5 implementation 项目共有依赖
"jshashes": "^1.0.7", // crypto 项目共有依赖
"chalk": "1.1.3", // Terminal string styling
"cross-spawn": "^5.1.0", // 跨平台 spawn
"escape-string-regexp": "1.0.5", // Escape RegExp special characters
"filesize": "3.3.0", // generate a human readable String describing the file size
"gzip-size": "3.0.0", // Get the gzipped size of a string or buffer
"html-entities": "1.2.1", // HTML entities encode/decode library.
"inquirer": "3.0.6", // interactive command line user interfaces.
"lodash": "^4.17.4", // utils
"opn": "5.0.0", // Cross-platform node-open
"qiniu": "^6.1.13", // qiniu sdk
"recursive-readdir": "2.2.1", // recurisve read dir
"shell-quote": "1.6.1", // Quote and parse shell commands
"sockjs-client": "1.1.4", // sockjs client
"strip-ansi": "3.0.1", // Strip ANSI escape codes
"text-table": "0.2.0", // Borderless text tables with alignment
"vue": "^2.3.3", // MVVM Library
"vue-i18n": "5", // i18n plugin for vue
"vue-router": "^2.3.1", // router plugin for vue
"vue-touch": "github:vuejs/vue-touch#next_old", // mobile touch library, lock the version
"vuex": "^2.0.0", // state management for vue
"wheel": "0.0.5" // wheel util
}
├── README.md
├── TODO.md
├── bin
│ └── mesh-devtool.js // 程序主入口
├── config
│ ├── env.js // 处理环境变量
│ ├── karma.conf.js // karma config
│ ├── karma.electron.conf.js // karma config for electron
│ ├── loaders.js // webpack loader
│ ├── paths.js // 定义路径变量
│ ├── polyfills.js // polyfills
│ ├── postcss.config.js // postcss config
│ ├── proxy.js // api proxy
│ ├── vue-loader.conf.js // vue loader config
│ ├── webpack.config.base.js // base webpack config
│ ├── webpack.config.dev.js // dev webpack config
│ ├── webpack.config.prod.js // production webpack config
│ ├── webpack.config.test.js // test env webpack config
│ └── webpackDevServer.config.js // webpack dev server config
├── package.json
├── public // 共有的 public 文件
│ ├── index.html
│ ├── manifest.json
│ └── static
│ └── icons
├── scripts // 实际执行的脚本
│ ├── build.js // build 命令
│ ├── deploy.js // deploy 命令
│ ├── e2e.js // e2e 命令
│ ├── start.js // start 命令
│ └── test.js // test 命令
├── utils
└── yarn.lock
-
项目重要模块的结构图以及流程图
Usage
It only have four commands
mesh-devtool [start / build / deploy / test / e2e]
command options are provide by process.env
process.env.TARGET : electron-renderer | web
process.env.REPORT : true // Analyze the bundle
e2e specific option
// adding this flag means you don't want to run the `start` script before e2e test, it is useful for adding test case frequently
yarn e2e --noBuild
Configs
enviroment variable setting, for inject to the js file using DefinePlugin
and also use in webpack config
paths config for webpack, this make webpack output files in right location
-
项目中存在改进的模块,以及存在严重问题均需要罗列出 issue 到 issue 中
需要迁移到 webpack 4