From 557ded5ad24a7416e1c920084aa1fc1d4f778db6 Mon Sep 17 00:00:00 2001 From: winixt Date: Fri, 1 Jul 2022 16:16:01 +0800 Subject: [PATCH] chore: update dependencies --- docs/guide/directory-structure.md | 143 ++++++++++-------- .../templates/app/pc/package.json | 2 +- packages/fes-plugin-layout/package.json | 2 +- packages/fes-plugin-locale/package.json | 2 +- .../examples/app1/package.json | 2 +- .../examples/main/package.json | 2 +- packages/fes-plugin-qiankun/package.json | 2 +- packages/fes-template/package.json | 2 +- 8 files changed, 83 insertions(+), 74 deletions(-) diff --git a/docs/guide/directory-structure.md b/docs/guide/directory-structure.md index 17954475..5a1bb6e3 100644 --- a/docs/guide/directory-structure.md +++ b/docs/guide/directory-structure.md @@ -1,6 +1,7 @@ # 目录结构 在[快速上手](./getting-started.html)中,大家对框架应该有初步的印象,接下来我们了解下目录结构。Fes.js 遵循 `约定优于配置` 的原则,一个基础的 Fes.js 项目大致是这样的: + ``` fes-template ├── package.json @@ -19,113 +20,119 @@ fes-template ``` ### package.json + ```json { - "name": "@fesjs/template", - "version": "2.0.0", - "description": "fes项目模版", - "scripts": { - "build": "fes build", - "prod": "FES_ENV=prod fes build", - "analyze": "ANALYZE=1 fes build", - "dev": "fes dev", - "test": "fes test" - }, - "keywords": [ - "管理端", - "fes", - "fast", - "easy", - "strong" - ], - "files": [ - ".eslintrc.js", - ".gitignore", - ".fes.js", - ".fes.prod.js", - "mock.js", - "package.json", - "README.md", - "tsconfig.json", - "/src", - "/config" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/WeBankFinTech/fes.js.git", - "directory": "packages/fes-template" - }, - "author": "harrywan", - "license": "MIT", - "bugs": { - "url": "https://github.com/WeBankFinTech/fes.js/issues" - }, - "homepage": "https://github.com/WeBankFinTech/fes.js#readme", - "publishConfig": { - "access": "public" - }, - "devDependencies": { - "@webank/eslint-config-webank": "0.3.1" - }, - "dependencies": { - "@fesjs/fes": "^2.0.0", - "@fesjs/plugin-access": "^2.0.0", - "@fesjs/plugin-layout": "^3.0.0", - "@fesjs/plugin-locale": "^3.0.0", - "@fesjs/plugin-model": "^2.0.0", - "@fesjs/plugin-enums": "^2.0.0", - "@fesjs/plugin-jest": "^2.0.0", - "@fesjs/plugin-vuex": "^2.0.0", - "@fesjs/plugin-request": "^2.0.0", - "@fesjs/plugin-qiankun": "^2.0.0", - "@fesjs/plugin-sass": "^2.0.0", - "@fesjs/plugin-monaco-editor": "^2.0.0-beta.0", - "@fesjs/plugin-windicss": "^2.0.0", - "@fesjs/fes-design": "^0.4.0", - "vue": "^3.0.5", - "vuex": "^4.0.0" - }, - "private": true + "name": "@fesjs/template", + "version": "2.0.0", + "description": "fes项目模版", + "scripts": { + "build": "fes build", + "prod": "FES_ENV=prod fes build", + "analyze": "ANALYZE=1 fes build", + "dev": "fes dev", + "test": "fes test" + }, + "keywords": ["管理端", "fes", "fast", "easy", "strong"], + "files": [ + ".eslintrc.js", + ".gitignore", + ".fes.js", + ".fes.prod.js", + "mock.js", + "package.json", + "README.md", + "tsconfig.json", + "/src", + "/config" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/WeBankFinTech/fes.js.git", + "directory": "packages/fes-template" + }, + "author": "harrywan", + "license": "MIT", + "bugs": { + "url": "https://github.com/WeBankFinTech/fes.js/issues" + }, + "homepage": "https://github.com/WeBankFinTech/fes.js#readme", + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "@webank/eslint-config-webank": "0.3.1" + }, + "dependencies": { + "@fesjs/fes": "^2.0.0", + "@fesjs/plugin-access": "^2.0.0", + "@fesjs/plugin-layout": "^3.0.0", + "@fesjs/plugin-locale": "^3.0.0", + "@fesjs/plugin-model": "^2.0.0", + "@fesjs/plugin-enums": "^2.0.0", + "@fesjs/plugin-jest": "^2.0.0", + "@fesjs/plugin-vuex": "^2.0.0", + "@fesjs/plugin-request": "^2.0.0", + "@fesjs/plugin-qiankun": "^2.0.0", + "@fesjs/plugin-sass": "^2.0.0", + "@fesjs/plugin-monaco-editor": "^2.0.0-beta.0", + "@fesjs/plugin-windicss": "^2.0.0", + "@fesjs/fes-design": "^0.5.0", + "vue": "^3.0.5", + "vuex": "^4.0.0" + }, + "private": true } ``` + 其中`@fesjs/fes`是 Fes.js 核心依赖,另外以 `@fesjs/preset-`、`@fesjs/plugin-`、`@webank/fes-preset-`、`@webank/fes-plugin-`、`fes-preset-` 和 `fes-plugin-` 开头的依赖会被自动注册为插件或插件集。 ### tsconfig.json + 解决 `@fesjs/fes` 和使用 `@` 的 API 提示 ### .fes.js + 配置文件,包含 Fes.js 内置功能和安装的其他插件配置。 ### mock.js + `mock` 数据的配置文件。 ### .env + 定义环境变量。 比如 `.env` 文件内容如下: + ``` PORT=8888 FES_ENV=prod ``` + 等同于 node 端运行时,设置如下: + ``` process.env.PORT = '8888'; process.env.FES_ENV = 'prod'; ``` - ### dist 目录 + 执行 `fes build` 后,产物默认会存放在这里。 ## public 目录 + 此目录下所有文件为静态资源,会被复制到输出路径。 ### index.html + 默认的 `html` 模板文件,如果删除此 `html` 则会使用内置的 `html` 模板文件。 ## src 目录 ### .fes 目录 + 临时文件目录,比如入口文件、路由等,都会被临时生成到这里。 :::warning @@ -133,7 +140,9 @@ process.env.FES_ENV = 'prod'; ::: ### pages 目录 + 所有路由组件文件存放在这里。 ### app.js -运行时配置文件,可以在这里扩展运行时的能力,比如修改路由等。 \ No newline at end of file + +运行时配置文件,可以在这里扩展运行时的能力,比如修改路由等。 diff --git a/packages/create-fes-app/templates/app/pc/package.json b/packages/create-fes-app/templates/app/pc/package.json index de977410..d6ac34c2 100644 --- a/packages/create-fes-app/templates/app/pc/package.json +++ b/packages/create-fes-app/templates/app/pc/package.json @@ -52,7 +52,7 @@ "@fesjs/plugin-layout": "^4.0.0", "@fesjs/plugin-model": "^2.0.0", "@fesjs/plugin-enums": "^2.0.0", - "@fesjs/fes-design": "^0.4.0", + "@fesjs/fes-design": "^0.5.0", "vue": "^3.2.6", "core-js": "^3.8.3" }, diff --git a/packages/fes-plugin-layout/package.json b/packages/fes-plugin-layout/package.json index 6f148f12..b4bb3cee 100644 --- a/packages/fes-plugin-layout/package.json +++ b/packages/fes-plugin-layout/package.json @@ -31,7 +31,7 @@ }, "peerDependencies": { "@fesjs/fes": "^2.0.0", - "@fesjs/fes-design": "^0.4.0", + "@fesjs/fes-design": "^0.5.0", "vue": "^3.0.5" } } diff --git a/packages/fes-plugin-locale/package.json b/packages/fes-plugin-locale/package.json index fbd961d2..eb167c73 100644 --- a/packages/fes-plugin-locale/package.json +++ b/packages/fes-plugin-locale/package.json @@ -32,7 +32,7 @@ }, "peerDependencies": { "@fesjs/fes": "^2.0.0", - "@fesjs/fes-design": "^0.4.0", + "@fesjs/fes-design": "^0.5.0", "vue": "^3.0.5" } } diff --git a/packages/fes-plugin-qiankun/examples/app1/package.json b/packages/fes-plugin-qiankun/examples/app1/package.json index c5d35742..96ac1d06 100644 --- a/packages/fes-plugin-qiankun/examples/app1/package.json +++ b/packages/fes-plugin-qiankun/examples/app1/package.json @@ -48,7 +48,7 @@ "dependencies": { "@fesjs/fes": "^2.0.0", "vue": "^3.0.5", - "@fesjs/fes-design": "^0.4.0" + "@fesjs/fes-design": "^0.5.0" }, "private": true } diff --git a/packages/fes-plugin-qiankun/examples/main/package.json b/packages/fes-plugin-qiankun/examples/main/package.json index f2b70d74..37639bd5 100644 --- a/packages/fes-plugin-qiankun/examples/main/package.json +++ b/packages/fes-plugin-qiankun/examples/main/package.json @@ -48,7 +48,7 @@ "dependencies": { "@fesjs/fes": "^2.0.0", "vue": "^3.0.5", - "@fesjs/fes-design": "^0.4.0" + "@fesjs/fes-design": "^0.5.0" }, "private": true } diff --git a/packages/fes-plugin-qiankun/package.json b/packages/fes-plugin-qiankun/package.json index 6659b032..f3c97073 100644 --- a/packages/fes-plugin-qiankun/package.json +++ b/packages/fes-plugin-qiankun/package.json @@ -39,7 +39,7 @@ }, "peerDependencies": { "@fesjs/fes": "^2.0.0", - "@fesjs/fes-design": "^0.4.0", + "@fesjs/fes-design": "^0.5.0", "vue": "^3.0.5" } } diff --git a/packages/fes-template/package.json b/packages/fes-template/package.json index a7505981..dadf80a9 100644 --- a/packages/fes-template/package.json +++ b/packages/fes-template/package.json @@ -61,7 +61,7 @@ "@fesjs/plugin-windicss": "^2.0.0", "@fesjs/plugin-pinia": "^2.0.0", "@fesjs/plugin-watermark": "^2.0.0", - "@fesjs/fes-design": "^0.4.0", + "@fesjs/fes-design": "^0.5.0", "vue": "^3.0.5", "vuex": "^4.0.0", "pinia": "^2.0.11"