Skip to content

Commit

Permalink
chore: merge branch 'master' into feat-form-widgets-module
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Nov 1, 2023
2 parents e5fe16a + b7dbc68 commit e1f0e3e
Show file tree
Hide file tree
Showing 62 changed files with 1,017 additions and 277 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-site.yml
Expand Up @@ -11,12 +11,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.10.0
node-version-file: '.nvmrc'
- run: yarn install

- name: build
run: |
yarn run site:build
yarn run site:build:ssr
cp ./src/dist/browser/index.html ./src/dist/browser/404.html
cp ./Dockerfile.docs ./src/dist/browser/Dockerfile.docs
cp -r ./_nginx/ ./src/dist/browser/_nginx
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-build-doc-site.yml
@@ -1,5 +1,6 @@
name: docker-build-doc-site

# on: push
on:
push:
branches:
Expand Down
14 changes: 12 additions & 2 deletions .gitignore
@@ -1,8 +1,7 @@
node_modules
npm-debug.log
# package-lock.json
yarn.lock
yarn-error.log
pnpm-lock.yaml
/coverage
/coverage-report
/junit
Expand Down Expand Up @@ -32,3 +31,14 @@ src/assets/style.dark.css
/integration
scripts/build/var.less
/schematics/plugin/files/rtl

# Yarn
yarn.lock
yarn-error.log
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
2 changes: 2 additions & 0 deletions .npmrc
@@ -0,0 +1,2 @@
# https://pnpm.io/npmrc#node-linker
node-linker=hoisted
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
16.15.0
18.12.0
6 changes: 4 additions & 2 deletions .vscode/settings.json
Expand Up @@ -5,7 +5,8 @@
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/dist/*/**": true,
"**/coverage/*/**": true
"**/coverage/*/**": true,
"**/.yarn/**": true
},
"editor.codeActionsOnSave": {
// For ESLint
Expand Down Expand Up @@ -35,5 +36,6 @@
"*.json": "jsonc",
".prettierrc": "json"
},
"angular.enable-strict-mode-prompt": false
"angular.enable-strict-mode-prompt": false,
"typescript.referencesCodeLens.enabled": true
}
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.1.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc.yml
@@ -0,0 +1,5 @@
enableImmutableInstalls: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.1.cjs
10 changes: 3 additions & 7 deletions azure-pipelines.yml
Expand Up @@ -13,21 +13,17 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.10.0'
versionSource: 'fromFile'
versionFilePath: '.nvmrc'
displayName: 'Install Node.js'

- stage: build
jobs:
- job: build
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.10.0'
displayName: 'Install Node.js'
- script: |
node --version
yarn --version
yarn config list
yarn install
displayName: 'Install'
- task: Bash@3
Expand Down Expand Up @@ -126,4 +122,4 @@ stages:
- script: yarn install
displayName: 'Install'
- script: yarn run lint
dependsOn: env
dependsOn: env
2 changes: 1 addition & 1 deletion docs/contributing.zh-CN.md
Expand Up @@ -38,7 +38,7 @@ type: Other

## Pull Request

Ng Alain 会关注所有的 pull request,我们会 review 以及合并你的代码,也有可能要求你做一些修改或者告诉你我们为什么不能接受这样的修改。
NG-ALAIN 会关注所有的 pull request,我们会 review 以及合并你的代码,也有可能要求你做一些修改或者告诉你我们为什么不能接受这样的修改。

**在你发送 Pull Request 之前**,请确认你是按照下面的步骤来做的:

Expand Down
19 changes: 8 additions & 11 deletions docs/faq.en-US.md
Expand Up @@ -61,18 +61,15 @@ Two situations:
- Using `cnpm` to install dependencies, you will not be able to find style files. This is because `cnpm` is in the form of a soft link path, which causes the `ng-zorro-antd` folder name to change, so it is recommended to use the `yarn` install dependency package instead.
- The `ng-zorro-antd` version is too old to cause some components to fail to load into the appropriate style

### How to use Taobao source correctly?
### How to use other mirror?

The simplest is to use the [networkEnv](/cli/plugin#networkEnv) plugin.

Or manually repair:
Install the [nnrm](https://github.com/YunYouJun/nnrm/blob/main/README.zh-CN.md) plugin.

```bash
yarn config set registry https://registry.npmmirror.com
yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass
# restore
yarn config delete registry
yarn config delete sass_binary_site
# Install nnrm
npm install -g nnrm
# Switch Npm to Taobao mirror
nnrm use taobao
```

## Configuration
Expand Down Expand Up @@ -100,8 +97,8 @@ Online documents will only retain the data of the last three major version numbe
```bash
git clone --depth 1 -b full https://github.com/ng-alain/archive-docs.git ng-alain-doc
cd ng-alain-doc
yarn
yarn start
npm install
npm start
```

### Fix the abnormal display of the lower part of the 360 browser
Expand Down
19 changes: 8 additions & 11 deletions docs/faq.zh-CN.md
Expand Up @@ -61,18 +61,15 @@ bash delon.sh
- 使用 `cnpm` 安装依赖包,会遇到无法找到样式文件。这是由于 `cnpm` 采用的是软链接路径形式,导致 `ng-zorro-antd` 文件夹名有所变动,因此建议改用 `yarn` 安装依赖包,如果是网络因素,请参考下方的如何正确使用淘宝源。
- `ng-zorro-antd` 版本过旧导致部分组件无法加载到相应样式

### 如何正确使用淘宝源
### 如何使用其他镜像源

最简单是使用 [networkEnv](/cli/plugin#networkEnv) 插件。

或手动修复:
安装 [nnrm](https://github.com/YunYouJun/nnrm/blob/main/README.zh-CN.md) 插件。

```bash
yarn config set registry https://registry.npmmirror.com
yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass
# 恢复
yarn config delete registry
yarn config delete sass_binary_site
# 安装 nnrm
npm install -g nnrm
# 将Npm切换至淘宝源(不同 npm 源管理器命令有点不一样,更多细节请参考 nnrm 文档)
nnrm use taobao
```

## 配置
Expand Down Expand Up @@ -100,8 +97,8 @@ yarn config delete sass_binary_site
```bash
git clone --depth 1 -b full https://github.com/ng-alain/archive-docs.git ng-alain-doc
cd ng-alain-doc
yarn
yarn start
npm install
npm start
```

### 修复360浏览器下部分显示异常
Expand Down
16 changes: 8 additions & 8 deletions docs/getting-started.en-US.md
Expand Up @@ -31,12 +31,12 @@ You will need [node](http://nodejs.org/) and [git](https://git-scm.com/). The pr
Please make sure global Angular Cli is latest version via `ng version` command, please refer to [CLI Command Reference](https://angular.io/cli) for how to upgrade.

```bash
yarn global add @angular/cli
ng new my-project --style less --routing --package-manager yarn
npm install -g @angular/cli
ng new my-project --style less --routing
cd my-project
ng add ng-alain
yarn start
# Or use HMR mode by: yarn run hmr
npm start
# Or use HMR mode by: npm run hmr
```

> Please refer to [Schematics](/cli) for more details.
Expand All @@ -46,9 +46,9 @@ yarn start
```bash
git clone --depth=1 https://github.com/ng-alain/ng-alain.git my-project
cd my-project
yarn
yarn start
# Or use HMR mode by: yarn run hmr
npm install
npm start
# Or use HMR mode by: npm run hmr
```

> Note: Installing with the CLI is a clean scaffolding; using clone the git repository include all example pages.
Expand Down Expand Up @@ -89,7 +89,7 @@ NG-ALAIN is a standard Angular CLI project that includes common routes for admin
## Development

```bash
yarn start
npm start
```

This will automatically open [http://localhost:4200](http://localhost:4200). If you see the following page then you have succeeded.
Expand Down
25 changes: 11 additions & 14 deletions docs/getting-started.zh-CN.md
Expand Up @@ -11,41 +11,38 @@ NG-ALAIN 是一个企业级中后台前端/设计解决方案脚手架,我们

## 环境搭建

Angular 开发环境至少需要安装 [Node.js](https://nodejs.org/en/download/)(Node.js 内置了 [npm](https://www.npmjs.com/get-npm) 无须单独安装,但**推荐使用** [Yarn](https://yarnpkg.com/) 但你需要单独额外安装)、[VSCode编辑器](https://code.visualstudio.com/),其中 Node.js 建议安装 **LTS** 版本,安装完成后可以通过终端窗口中运行:
Angular 开发环境至少需要安装 [Node.js](https://nodejs.org/en/download/)(Node.js 内置了 [npm](https://www.npmjs.com/get-npm) 无须单独安装)、[VSCode编辑器](https://code.visualstudio.com/),其中 Node.js 建议安装 **LTS** 版本,安装完成后可以通过终端窗口中运行:

```bash
node -v # 查看 Node.js 当前版本
yarn -v # 查看 Yarn 当前版本
npm -v # 查看 Npm 当前版本
```

Yarn 默认从国外源来下载包信息,鉴于国内环境因素,在开始下一步前先设定淘宝提供镜像
Npm 默认从国外源来下载包信息,鉴于国内环境因素,在开始下一步前先安装 [nnrm](https://github.com/YunYouJun/nnrm/blob/main/README.zh-CN.md) 并切换至淘宝镜像

```bash
yarn config set registry https://registry.npmmirror.com
yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass
# restore
yarn config delete registry
yarn config delete sass_binary_site
# 安装 nnrm
npm install -g nnrm
# 将Npm切换至淘宝源(不同 npm 源管理器命令有点不一样,更多细节请参考 nnrm 文档)
nnrm use taobao
```

> 也可以使用 [nrm](https://www.npmjs.com/package/nrm) 包,可以快速切换不同国内镜像源。
## 安装

### 全局 Angular Cli

安装之前请先确保本地已经安装全局 Angular Cli,只有这样才能随时随地在终端使用 `ng` 命令,可以通过终端窗口中运行:

```bash
yarn global add @angular/cli
npm install -g @angular/cli
```

### 创建NG-ALAIN项目

NG-ALAIN 必须先创建一个全新的 Angular 项目,可以通过终端窗口中运行:

```bash
ng new my-project --style less --routing --package-manager yarn
ng new my-project --style less --routing
```

> 如果你想了解 `--style``--routing` 参数,请参考 [ng new](https://angular.io/cli/new#options) 文档。
Expand All @@ -63,13 +60,13 @@ NG-ALAIN 会询问是否需要一些额外的插件,一开始完全可以一
> ```bash
> git clone --depth=1 https://github.com/ng-alain/ng-alain.git my-project
> cd my-project
> yarn install
> npm install
> ```
### 运行

```bash
yarn start
npm start
```

启动完成后会打开浏览器访问 [http://localhost:4200](http://localhost:4200),若你看到如下页面则代表成功了。
Expand Down
4 changes: 2 additions & 2 deletions docs/import.en-US.md
Expand Up @@ -11,7 +11,7 @@ In addition to the NG-ALAIN base component and the @delon business component, so
### Installing dependencies

```bash
yarn add ngx-tinymce
npm i -S ngx-tinymce
```

### Import module
Expand Down Expand Up @@ -55,7 +55,7 @@ Referencing a non-Angular component is actually loading a JavaScript class libra
### Installing dependencies

```bash
yarn add qrious
npm i -S qrious
```

### Import Scripts
Expand Down
4 changes: 2 additions & 2 deletions docs/import.zh-CN.md
Expand Up @@ -11,7 +11,7 @@ type: Dev
### 安装依赖包

```bash
yarn add ngx-tinymce
npm i -S ngx-tinymce
```

### 注册
Expand Down Expand Up @@ -55,7 +55,7 @@ export class AppModule { }
### 安装依赖包

```bash
yarn add qrious
npm i -S qrious
```

### 导入脚本
Expand Down
3 changes: 2 additions & 1 deletion docs/server.en-US.md
Expand Up @@ -11,10 +11,11 @@ Work in the form of the Restful API with the server application of any technolog
In NG-ALAIN, a complete front-end UI interaction to the server-side processing flow looks like this:

1. Start Angular for the first time to execute `APP_INITIALIZER`;
- Usually some APP general data is loaded before startup, such as currently authorized user data, menu data, dictionary data, configuration data, etc.
2. UI component interaction;
3. Send the request using the encapsulated [_HttpClient](/theme/http);
4. Trigger the user authentication interceptor [@delon/auth](/auth/getting-started) and add the `token` parameter uniformly;
- If there is no `token` or an expired interrupt subsequent request, jump directly to the login page;
- If there is no `token` or an expired interrupt subsequent request, jump directly to the login page;
5. Trigger the default interceptor to process the prefix and other information;
6. Get the server back;
7. Trigger the default interceptor to handle request exceptions, business exceptions, etc.
Expand Down
1 change: 1 addition & 0 deletions docs/server.zh-CN.md
Expand Up @@ -12,6 +12,7 @@ NG-ALAIN 是一套基于 Angular 技术栈的单页面应用,我们提供的
在 NG-ALAIN 中,一个完整的前端 UI 交互到服务端处理流程是这样的:

1. 首次启动 Angular 执行 `APP_INITIALIZER`
- 通常会在启动前先加载一些APP通用数据,例如:当前已授权用户数据、菜单数据、字典数据、配置项等
2. UI 组件交互操作;
3. 使用封装的 [_HttpClient](/theme/http) 发送请求;
4. 触发用户认证拦截器 [@delon/auth](/auth/getting-started),统一加入 `token` 参数;
Expand Down
4 changes: 1 addition & 3 deletions package.json
Expand Up @@ -21,9 +21,7 @@
},
"homepage": "https://ng-alain.com",
"engines": {
"node": "^16.13.0 || ^18.10.0",
"yarn": ">=1.21.1 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
"node": "^18.10.0"
},
"scripts": {
"ng-high-memory": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng",
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/count-down/index.en-US.md
Expand Up @@ -11,7 +11,7 @@ The countdown component depends on [ngx-countdown](https://github.com/cipchk/ngx
## Dependencies

```
yarn add ngx-countdown
npm i -S ngx-countdown
```

## API
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/count-down/index.zh-CN.md
Expand Up @@ -11,7 +11,7 @@ module: import { CountDownModule } from '@delon/abc/count-down';
## 依赖

```
yarn add ngx-countdown
npm i -S ngx-countdown
```

## API
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/pdf/index.en-US.md
Expand Up @@ -16,7 +16,7 @@ pdf.js libary is lazy loading by default,you can change the default root CDN p
**Use local path**

```bash
yarn add pdfjs-dist
npm i -S pdfjs-dist
```

```json
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/pdf/index.zh-CN.md
Expand Up @@ -16,7 +16,7 @@ module: import { PdfModule } from '@delon/abc/pdf';
**使用本地路径**

```bash
yarn add pdfjs-dist
npm i -S pdfjs-dist
```

```json
Expand Down

0 comments on commit e1f0e3e

Please sign in to comment.