Skip to content

Commit

Permalink
chore: merge branch 'master' into site-data
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Nov 26, 2023
2 parents 0305ec0 + 0b423c5 commit 34ca468
Show file tree
Hide file tree
Showing 345 changed files with 5,399 additions and 4,436 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
],
rules: {
'prettier/prettier': ['error', prettierConfig],
'jsdoc/newline-after-description': 1,
'@angular-eslint/component-selector': [
'off',
{
Expand Down Expand Up @@ -171,8 +170,7 @@ module.exports = {
'@angular-eslint/no-input-rename': 'off',
'prefer-const': 'off',
'max-len': 'off',
'deprecation/deprecation': 'warn',
'jsdoc/newline-after-description': 'off'
'deprecation/deprecation': 'warn'
}
},
{
Expand Down
29 changes: 13 additions & 16 deletions docs/architecture.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,22 @@ Schematic diagram of directory structure:
├── _mock # Mock Data rule
├── src
│   ├── app
│   │   ├── core # Core module
│   │   ├── core # Core
│   │   │   ├── i18n
│   │   │   ├── net
│   │   │   │   └── default.interceptor.ts # Default HTTP interceptor
│   │   │   ├── services
│   │   │   │   └── startup.service.ts # Initialize project configuration
│   │   │   └── core.module.ts # Core module file
│   │   │   └── index.ts # Core index.ts
│   │   ├── layout # Core layout
│   │   ├── routes
│   │   │   ├── ** # Business directory
│   │   │   ├── routes.module.ts # Service routing module
│   │   │   └── routes-routing.module.ts # Service routes registration
│   │   │   └── routes.ts # Service routes registration
│   │   ├── shared # Shared module
│   │   │   ├── shared-delon.module.ts # @Delon/* import of secondary shared modules
│   │   │   ├── shared-zorro.module.ts # NG-ZORRO import of secondary shared modules
│   │   │   └── shared.module.ts # Shared module file
│   │   │   ├── shared-imports.ts # A collection of frequently shared components
│   │   │   └── index.ts # Shared index.ts
│   │   ├── app.component.ts # Root component
│   │   └── app.module.ts # Root module
│   │   └── global-config.module.ts # @delon & ng-zorro global config
│   │   └── app.config.ts # Global config
│   ├── assets # Local static resource
│   ├── environments # Environment variable configuration
│   ├── styles # Style directory
Expand All @@ -96,9 +93,9 @@ The following is a description and use of each directory and file.

The Mock data rules directory, if you create a project via [Command Line Tools](/cli), you can specify the `--mock` parameter to determine if the Mock function is required.

**src/app/core/core.module.ts**
**src/app/core/index.ts**

The core module will only be imported once. Therefore, core service classes (eg, messages, data access, etc.) that are required for the entire ** business module should exist here.
Some core business services (for example: messaging, data access, etc.)

**src/app/core/i18n**

Expand All @@ -108,7 +105,7 @@ The core module will only be imported once. Therefore, core service classes (eg,

The default interceptor, where you can handle request parameters, request exceptions, business exceptions, and so on.

**src/app/core/services/startup.service.ts**
**src/app/core/startup/startup.service.ts**

Useful when you need to execute some remote data (eg application information, user information, etc.) before Angular launches.

Expand All @@ -122,13 +119,13 @@ Layout file code, refer to the page structure section.

Business module, all your business code will be here.

**src/app/shared/shared.module.ts**
**src/app/shared/index.ts**

The shared module means that some third-party modules, custom components, and custom instructions that you need to use for the entire business module should exist here. In addition, for @delon & NG-ZORRO, two shared secondary module imports, `shared-delon.module.ts` and` shared-zorro.module.ts`.
A collection of some frequently shared components, The means that some third-party modules, custom components, and custom instructions that you need to use for the entire business module should exist here. In addition, for @delon & NG-ZORRO, two shared secondary module imports, `shared-delon.module.ts` and` shared-zorro.module.ts`.

**src/app/global-config.module.ts**
**src/app/app.config.ts**

Global configuration for @delon & NG-ZORRO.
Global configuration for project.

**src/environments**

Expand Down
25 changes: 11 additions & 14 deletions docs/architecture.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,22 @@ NG-ALAIN 目标是提供更多通用性业务模块,让开发者更加专注
├── angular.json # Angular 项目配置文件
├── src
│   ├── app
│   │   ├── core # 核心模块
│   │   ├── core # 核心
│   │   │   ├── i18n
│   │   │   ├── net
│   │   │   │   └── default.interceptor.ts # 默认HTTP拦截器
│   │   │   ├── services
│   │   │   │   └── startup.service.ts # 初始化项目配置
│   │   │   └── core.module.ts # 核心模块文件
│   │   │   └── index.ts # 核心导出
│   │   ├── layout # 通用布局
│   │   ├── routes
│   │   │   ├── ** # 业务目录
│   │   │   ├── routes.module.ts # 业务路由模块
│   │   │   └── routes-routing.module.ts # 业务路由注册口
│   │   ├── shared # 共享模块
│   │   │   ├── shared-delon.module.ts # @Delon/* 次级共享模块导入
│   │   │   ├── shared-zorro.module.ts # NG-ZORRO 次级共享模块导入
│   │   │   └── shared.module.ts # 共享模块文件
│   │   │   └── routes.ts # 业务路由
│   │   ├── shared # 共享
│   │   │   ├── shared-imports.ts # 一些高频率共享组件的集合
│   │   │   └── index.ts # 共享导出
│   │   ├── app.component.ts # 根组件
│   │   └── app.module.ts # 根模块
│   │   └── global-config.module.ts # @delon & ng-zorro 全局配置项
│   │   └── app.config.ts # 全局配置项
│   ├── assets # 本地静态资源
│   ├── environments # 环境变量配置
│   ├── styles # 样式目录
Expand All @@ -65,12 +62,12 @@ NG-ALAIN 目标是提供更多通用性业务模块,让开发者更加专注
|----|----|
| **angular.json** | Angular 工作区及项目的配置文件,参考[Angular文档](https://angular.cn/guide/workspace-config) |
| **_mock** | Mock 数据规则目录,若你通过 [命令行工具](/cli) 创建项目时可以指定 `--mock` 参数决定是否需要 Mock 功能 |
| **src/app/core/core.module.ts** | 核心模块,只会导入一次。因此,针对整个**业务模块都需要**使用的纯服务类(例如:消息、数据访问等) |
| **src/app/core/index.ts** | 一些核心业务服务(例如:消息、数据访问等) |
| **src/app/core/i18n** | [国际化](/docs/i18n)数据加载及处理相关类,若你通过 [命令行工具](/cli) 创建项目时可以指定 `-di` 参数决定是否需要国际化支持 |
| **src/app/core/net** | 默认拦截器,你可以在这里统一处理请求参数、请求异常、业务异常等动作 |
| **src/app/core/services/startup.service.ts** | 当你需要在 Angular 启动前执行一些远程数据(例如:应用信息、用户信息等)时非常有用 |
| **src/app/core/startup/startup.service.ts** | 当你需要在 Angular 启动前执行一些远程数据(例如:应用信息、用户信息等)时非常有用 |
| **src/app/layout** | 布局目录,包含基础布局、空白布局、用户登录布局 |
| **src/app/routes** | 业务模块,你的所有业务代码都将在这里 |
| **src/app/shared/shared.module.ts** | 共享模块,指当你需要针对整个**业务模块都需要**使用的一些第三方模块、自定义组件、自定义指令,都应该存在这里。除此之外,针对 @delon & NG-ZORRO 分别构建了 `shared-delon.module.ts``shared-zorro.module.ts` 两种次级共享模块的导入。 |
| **src/app/global-config.module.ts** | 针对 @delon & NG-ZORRO 的全局配置项 |
| **src/app/shared/index.ts** | 一些高频率共享组件的集合,指当你需要针对整个**业务模块都需要**使用的一些第三方模块、自定义组件、自定义指令,都应该存在这里。除此之外,针对 @delon & NG-ZORRO 分别构建了 `shared-delon.module.ts``shared-zorro.module.ts` 两种次级共享模块的导入。 |
| **src/app/app.config.ts** | 项目全局配置项 |
| **src/environments** | 应用环境变量,包含以下值:`SERVER_URL` 所有HTTP请求的前缀;`production` 是否生产环境;`useHash` 路由是否useHash模式 |
Loading

0 comments on commit 34ca468

Please sign in to comment.