Skip to content

Commit

Permalink
release(12.0.0): release 12.0.0 (#1286)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Jul 16, 2021
1 parent 858c616 commit feec9db
Show file tree
Hide file tree
Showing 13 changed files with 177 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
# Copy dockerfile.docs & _nginx just only for ng-alain.com
run: |
npm run site:gen
node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod --base-href /delon/
node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --base-href /delon/
npm run site:helper
npm run site:minify
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
12 changes: 6 additions & 6 deletions .github/workflows/ssr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: push

jobs:
website:
if: "startsWith(github.event.commits[0].message, 'release')"
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -16,9 +17,8 @@ jobs:
run: |
npm run ssr:build
- name: to-delon-builds
if: "startsWith(github.event.commits[0].message, 'release')"
run: |
bash ./scripts/ci/build-artifacts-site-ssr.sh
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# - name: to-delon-builds
# run: |
# bash ./scripts/ci/build-artifacts-site.sh -ssr
# env:
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# [12.0.0](https://github.com/ng-alain/delon/compare/11.10.4...12.0.0) (2021-07-16)


### Features

* **abc:notice-icon:** add `emptyText`, `title`, `description` support TemplateRef ([#1256](https://github.com/ng-alain/delon/issues/1256)) ([596ca40](https://github.com/ng-alain/delon/commit/596ca40c254e619dc868deced7d4f105fac2d797))
* **abc:se,sv:** add `nz-divider` support ([#1283](https://github.com/ng-alain/delon/issues/1283)) ([46d6e3d](https://github.com/ng-alain/delon/commit/46d6e3d60a8903c4a71fc64efc5e8b2d596c3742))
* **abc:st:** add autocomplete index ([#1284](https://github.com/ng-alain/delon/issues/1284)) ([5d8c017](https://github.com/ng-alain/delon/commit/5d8c01788e6f23853d83a67593b87ffee86bd2d4))
* **cache:** add custom request ([#1253](https://github.com/ng-alain/delon/issues/1253)) ([084037e](https://github.com/ng-alain/delon/commit/084037e73c094636eb510565863e403259f264d1))
* **chart:bar,mini-area,mini-bar:** add `color` in data ([#1279](https://github.com/ng-alain/delon/issues/1279)) ([1ea098d](https://github.com/ng-alain/delon/commit/1ea098daaeca6eedfb07f5f342052b1c3e3ffb6a))
* **chart:echarts:** support resize ([#1263](https://github.com/ng-alain/delon/issues/1263)) ([9ac3a99](https://github.com/ng-alain/delon/commit/9ac3a99c85f773e63232b2723201b8888fbe5cf0))
* **form:** add `property` property of `visibleIf` function ([#1281](https://github.com/ng-alain/delon/issues/1281)) ([980b8a5](https://github.com/ng-alain/delon/commit/980b8a528bbf59f474984994f6a7271a89cf70b6))
* **theme:theme-btn:** add `deployUrl` property ([#1264](https://github.com/ng-alain/delon/issues/1264)) ([05ce8f2](https://github.com/ng-alain/delon/commit/05ce8f20f7c4b62d75c23e3b1013c8e9951034ff))
* **theme:** add enabled of util classes ([#1280](https://github.com/ng-alain/delon/issues/1280)) ([273aeed](https://github.com/ng-alain/delon/commit/273aeedeb748f97163cd0282288a9947dc93d605))
* **util:** add mobile number format starting with `16` ([#1282](https://github.com/ng-alain/delon/issues/1282)) ([cd98359](https://github.com/ng-alain/delon/commit/cd983593e05fbdcdb83cb155d6b5f7fbba435702))


### Performance Improvements

* use build-in `i18n` instead of `@ngx-translate/core` ([#1276](https://github.com/ng-alain/delon/issues/1276)) ([ba48cc3](https://github.com/ng-alain/delon/commit/ba48cc3f574837064940f720323351172dd4e3df))



25 changes: 21 additions & 4 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# # SSR
# FROM node:lts as dist
# MAINTAINER authors="cipchk <[email protected]>"

# WORKDIR /usr/src/app
# RUN git clone --depth 1 --branch site https://github.com/ng-alain/delon-builds.git .

# EXPOSE 80
# CMD [ "node", "server/main.js" ]


FROM node:lts as dist
MAINTAINER authors="cipchk <[email protected]>"
WORKDIR /dist
RUN git clone --depth 1 --branch gh-pages https://github.com/ng-alain/delon.git . \
&& sed -i 's/\/delon\//\//g' /dist/index.html \
&& sed -i 's/\/delon\//\//g' /dist/404.html
COPY _nginx _nginx

WORKDIR /usr/src/app
RUN git clone --depth 1 --branch site-ssr https://github.com/ng-alain/delon-builds.git .
FROM nginx:stable-alpine
RUN rm -rf /usr/share/nginx/html/*
COPY --from=dist /dist /usr/share/nginx/html
COPY --from=dist /dist/_nginx/default.conf /etc/nginx/conf.d/

EXPOSE 80
CMD [ "node", "server/main.js" ]
CMD ["nginx", "-g", "daemon off;"]
50 changes: 48 additions & 2 deletions docs/changelog.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,52 @@ NG-ALAIN strictly follows [Semantic Versioning 2.0.0](http://semver.org/lang/zh-

---

## Old Version
# [12.0.0](https://github.com/ng-alain/delon/compare/11.10.4...12.0.0) (2021-07-16)

All releases notes can be found [here](https://github.com/ng-alain/ng-alain/releases)
### Features

* **abc:st:** add intellisense for `index` ([#1284](https://github.com/ng-alain/delon/issues/1284)) ([5d8c017](https://github.com/ng-alain/delon/commit/5d8c01788e6f23853d83a67593b87ffee86bd2d4))
* **abc:notice-icon:** add `emptyText`, `title`, `description` support TemplateRef ([#1256](https://github.com/ng-alain/delon/issues/1256)) ([596ca40](https://github.com/ng-alain/delon/commit/596ca40c254e619dc868deced7d4f105fac2d797))
* **abc:se,sv:** add `nz-divider` support ([#1283](https://github.com/ng-alain/delon/issues/1283)) ([46d6e3d](https://github.com/ng-alain/delon/commit/46d6e3d60a8903c4a71fc64efc5e8b2d596c3742))
* **cache:** add custom request ([#1253](https://github.com/ng-alain/delon/issues/1253)) ([084037e](https://github.com/ng-alain/delon/commit/084037e73c094636eb510565863e403259f264d1))
* **chart:bar,mini-area,mini-bar:** add `color` in data ([#1279](https://github.com/ng-alain/delon/issues/1279)) ([1ea098d](https://github.com/ng-alain/delon/commit/1ea098daaeca6eedfb07f5f342052b1c3e3ffb6a))
* **chart:echarts:** support resize ([#1263](https://github.com/ng-alain/delon/issues/1263)) ([9ac3a99](https://github.com/ng-alain/delon/commit/9ac3a99c85f773e63232b2723201b8888fbe5cf0))
* **form:** add `property` property of `visibleIf` function ([#1281](https://github.com/ng-alain/delon/issues/1281)) ([980b8a5](https://github.com/ng-alain/delon/commit/980b8a528bbf59f474984994f6a7271a89cf70b6))
* **theme:theme-btn:** add `deployUrl` property ([#1264](https://github.com/ng-alain/delon/issues/1264)) ([05ce8f2](https://github.com/ng-alain/delon/commit/05ce8f20f7c4b62d75c23e3b1013c8e9951034ff))
* **theme:** add enabled of util classes ([#1280](https://github.com/ng-alain/delon/issues/1280)) ([273aeed](https://github.com/ng-alain/delon/commit/273aeedeb748f97163cd0282288a9947dc93d605))
* **util:** add mobile number format starting with `16` ([#1282](https://github.com/ng-alain/delon/issues/1282)) ([cd98359](https://github.com/ng-alain/delon/commit/cd983593e05fbdcdb83cb155d6b5f7fbba435702))

### Performance Improvements

* use build-in `i18n` instead of `@ngx-translate/core` ([#1276](https://github.com/ng-alain/delon/issues/1276)) ([ba48cc3](https://github.com/ng-alain/delon/commit/ba48cc3f574837064940f720323351172dd4e3df))

### BREAKING CHANGES

**DelonChartModule**
- Removed

**WINDOW**
- Used `import { WINDOW } from '@delon/util/token';` instead

**_currency**
- Used [price](https://ng-alain.com/util/pipes-currency/en?#price) pipe instead

**_HttpClient.end**
- Used `cleanLoading` instead

**ModalHelper.open, static**
- `open` used `create` instead
- `static` used `createStatic` instead

**ScrollService**
- Used `import { ScrollService } from '{AT}delon/util/browser';` instead

**Badges Class**
- Used `nz-tag` instead

**AlainMockConfig.data**
- Used `DelonMockModule.forRoot({ data: {} })` instead

## Old Versions

All releases notes can be found [here](https://github.com/ng-alain/ng-alain/releases).
50 changes: 48 additions & 2 deletions docs/changelog.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,52 @@ NG-ALAIN 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/)

---

## 旧版本
# [12.0.0](https://github.com/ng-alain/delon/compare/11.10.4...12.0.0) (2021-07-16)

旧版本的更新记录可以在 [Github](https://github.com/ng-alain/ng-alain/releases) 查看
### Features

* **abc:st:** 新增 `index` 支持智能代码补全 ([#1284](https://github.com/ng-alain/delon/issues/1284)) ([5d8c017](https://github.com/ng-alain/delon/commit/5d8c01788e6f23853d83a67593b87ffee86bd2d4))
* **abc:notice-icon:** 新增 `emptyText`, `title`, `description` 支持 `TemplateRef` ([#1256](https://github.com/ng-alain/delon/issues/1256)) ([596ca40](https://github.com/ng-alain/delon/commit/596ca40c254e619dc868deced7d4f105fac2d797))
* **abc:se,sv:** 新增对 `nz-divider` 支持,显示分隔线 ([#1283](https://github.com/ng-alain/delon/issues/1283)) ([46d6e3d](https://github.com/ng-alain/delon/commit/46d6e3d60a8903c4a71fc64efc5e8b2d596c3742))
* **cache:** 新增自定义请求接口 ([#1253](https://github.com/ng-alain/delon/issues/1253)) ([084037e](https://github.com/ng-alain/delon/commit/084037e73c094636eb510565863e403259f264d1))
* **chart:bar,mini-area,mini-bar:** 数据内新增 `color` 参数 ([#1279](https://github.com/ng-alain/delon/issues/1279)) ([1ea098d](https://github.com/ng-alain/delon/commit/1ea098daaeca6eedfb07f5f342052b1c3e3ffb6a))
* **chart:echarts:** 支持跟随浏览器调整 ([#1263](https://github.com/ng-alain/delon/issues/1263)) ([9ac3a99](https://github.com/ng-alain/delon/commit/9ac3a99c85f773e63232b2723201b8888fbe5cf0))
* **form:** `visibleIf` 参数增加 `property` 属性 ([#1281](https://github.com/ng-alain/delon/issues/1281)) ([980b8a5](https://github.com/ng-alain/delon/commit/980b8a528bbf59f474984994f6a7271a89cf70b6))
* **theme:theme-btn:** 增加 `deployUrl` 属性 ([#1264](https://github.com/ng-alain/delon/issues/1264)) ([05ce8f2](https://github.com/ng-alain/delon/commit/05ce8f20f7c4b62d75c23e3b1013c8e9951034ff))
* **theme:** 增加工具类开关 ([#1280](https://github.com/ng-alain/delon/issues/1280)) ([273aeed](https://github.com/ng-alain/delon/commit/273aeedeb748f97163cd0282288a9947dc93d605))
* **util:** 增加手机号 `16` 开头格式 ([#1282](https://github.com/ng-alain/delon/issues/1282)) ([cd98359](https://github.com/ng-alain/delon/commit/cd983593e05fbdcdb83cb155d6b5f7fbba435702))

### Performance Improvements

* 使用内置简易 `i18n` 替代 `@ngx-translate/core` ([#1276](https://github.com/ng-alain/delon/issues/1276)) ([ba48cc3](https://github.com/ng-alain/delon/commit/ba48cc3f574837064940f720323351172dd4e3df))

### BREAKING CHANGES

**DelonChartModule**
- 已移除

**WINDOW**
- 使用 `import { WINDOW } from '@delon/util/token';` 替代

**_currency**
- 使用 [price](https://ng-alain.com/util/pipes-currency/en?#price) 管道替代

**_HttpClient.end**
- 使用 `cleanLoading` 替代

**ModalHelper.open, static**
- `open` 使用 `create` 替代
- `static` 使用 `createStatic` 替代

**ScrollService**
- 使用 `import { ScrollService } from '{AT}delon/util/browser';` 替代

**Badges Class**
- 使用 `nz-tag` 替代

**AlainMockConfig.data**
- 使用 `DelonMockModule.forRoot({ data: {} })` 替代

## 历史版本

历史版本的更新记录可以在 [Github](https://github.com/ng-alain/ng-alain/releases) 查看。
6 changes: 3 additions & 3 deletions docs/deploy.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Avoid executing `ng build` when throw error **JavaScript heap out of memory**:
```json
{
"scripts": {
"build": "node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod"
"build": "node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build"
}
}
```
Expand Down Expand Up @@ -57,7 +57,7 @@ The default static resource reference path directly points to the directory wher
If your static resource is deployed to another domain name (such as a separate CDN address), you can specify a CDN address with the `--deployUrl` parameter.

```bash
ng build --prod -deployUrl=//cdn.ng-alain.com/
ng build -deployUrl=//cdn.ng-alain.com/
```

The generated `index.html` with its `*.js`, `*.css` files will automatically refer to `//cdn.ng-alain.com/*.js`, `//cdn.ng-alain.com/*css`, respectively.
Expand Down Expand Up @@ -140,4 +140,4 @@ Finally, add the `ports` node of `docker-compose.yml`:

### Container deployment

Refer to [Angular Container Deployment](https://zhuanlan.zhihu.com/p/35688938).
Refer to [Angular Container Deployment](https://zhuanlan.zhihu.com/p/35688938).
6 changes: 3 additions & 3 deletions docs/deploy.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NG-ALAIN 本身是一个 Angular CLI 项目,因此也可以参照 [Build](http
```json
{
"scripts": {
"build": "node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod"
"build": "node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build"
}
}
```
Expand Down Expand Up @@ -57,7 +57,7 @@ npm run analyze:view
如果你的静态资源是部署到其他域名(例如独立的 cdn 地址),你可以透过 `-d` 参数指定一个 cdn 地址。

```bash
ng build --prod -d=//cdn.ng-alain.com/
ng build -d=//cdn.ng-alain.com/
```

这样生成的 `index.html``*.js``*.css` 会自动加上 `//cdn.ng-alain.com/*.js`
Expand Down Expand Up @@ -140,4 +140,4 @@ NG-ALAIN 提供的 Dockerfile 文件相对于比较简单,而实际项目中

### 容器部署

参考 [Angular 容器部署](https://zhuanlan.zhihu.com/p/35688938)
参考 [Angular 容器部署](https://zhuanlan.zhihu.com/p/35688938)
2 changes: 1 addition & 1 deletion docs/ie11.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Differential loading has been supported since Angular8, when differential loadin

**And IE11 only supports the second bundle.**

By default, Angular will only generate this kind of differentiated build when `ng build --prod`. If the project needs deep support for IE, then additional configuration is required; for more details, please refer to the official website [Differential Loading](https://angular.io/guide/deployment#differential-loading).
By default, Angular will only generate this kind of differentiated build when `ng build`. If the project needs deep support for IE, then additional configuration is required; for more details, please refer to the official website [Differential Loading](https://angular.io/guide/deployment#differential-loading).

At the same time, NG-ALAIN also provides a [plug-in IE](/cli/plugin#ie), so that the project supports the development of IE11.

Expand Down
2 changes: 1 addition & 1 deletion docs/ie11.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type: Dev

**而 IE11 只支持第二种。**

Angular 默认只会在 `ng build --prod` 时才会产生这种差异化构建,如果项目需要对IE深度的支持,那么需要额外的配置;有关更多细节请参考官网[差异加载](https://angular.cn/guide/deployment#differential-loading)章节。
Angular 默认只会在 `ng build` 时才会产生这种差异化构建,如果项目需要对IE深度的支持,那么需要额外的配置;有关更多细节请参考官网[差异加载](https://angular.cn/guide/deployment#differential-loading)章节。

同时,NG-ALAIN 也提供一个快捷 [插件IE](/cli/plugin#ie),使项目支持IE11的开发。

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delon",
"version": "12.0.0-beta.0",
"version": "12.0.0",
"description": "Delon is a set of essential modules for NG-ALAIN.",
"keywords": [
"delon",
Expand Down Expand Up @@ -38,8 +38,9 @@
"analyze": "npm run ng-high-memory build -- --source-map",
"analyze:view": "source-map-explorer src/dist/browser/*.js",
"site:gen": "node scripts/site/main init && ng-alain-plugin-theme -t=themeCss && ng-alain-plugin-theme -t=colorLess",
"site:build": "npm run site:gen && npm run ng-high-memory build && npm run site:helper && node scripts/build/minify.js",
"site:build": "npm run site:gen && npm run ng-high-memory build && npm run site:helper && npm run site:minify",
"site:helper": "bash scripts/ci/helper.sh",
"site:minify": "node scripts/build/minify.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --pkg package.json",
"pre-publish": "node scripts/publish/publish.js && node scripts/publish/publish-scaffold.js",
"publish:next": "bash scripts/publish/publish.sh -next",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ readonly thisDir=$(cd $(dirname $0); pwd)

cd $(dirname $0)/../..

SSR=false
for ARG in "$@"; do
case "$ARG" in
-ssr)
SSR=true
;;
esac
done

commitSha=$(git rev-parse --short HEAD)
commitAuthorName=$(git --no-pager show -s --format='%an' HEAD)
commitAuthorEmail=$(git --no-pager show -s --format='%ae' HEAD)
Expand All @@ -32,13 +41,18 @@ cp ${DIST}/browser/index.html ${DIST}/browser/404.html
buildDir=${DIST}/publish
rm -rf ${buildDir}
mkdir -p ${buildDir}
cp -r ${DIST}/browser ${buildDir}/browser
cp -r ${DIST}/server ${buildDir}/server

if [[ ${SSR} == true ]]; then
cp -r ${DIST}/browser ${buildDir}/browser
cp -r ${DIST}/server ${buildDir}/server
else
cp -r ${DIST}/browser ${buildDir}
fi
cp ./Dockerfile.docs ${buildDir}/Dockerfile.docs

packageRepo=delon-builds
buildVersion=$(node -pe "require('./package.json').version")
branchName=${TRAVIS_BRANCH:-'site-ssr'}
branchName=${TRAVIS_BRANCH:-'site'}

buildVersionName="${buildVersion}-${commitSha}"
buildTagName="${branchName}-${commitSha}"
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const pkg = require('../../../../package.json');
export class HeaderComponent implements AfterViewInit {
private inited = false;
isMobile: boolean;
oldVersionList = [`10.x`, `9.x`, `8.x`, `1.x`];
oldVersionList = [`11.x`, `10.x`, `9.x`, `8.x`, `1.x`];
currentVersion = pkg.version;
delonLibs: Array<{ name: string; default?: string }> = [
{ name: 'theme' },
Expand Down

0 comments on commit feec9db

Please sign in to comment.