Skip to content

Commit

Permalink
Merge branch 'ng-alain:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
goten002 committed Oct 8, 2023
2 parents ca9202a + 76db16c commit 6dbee13
Show file tree
Hide file tree
Showing 1,177 changed files with 17,956 additions and 10,376 deletions.
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

31 changes: 23 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
project: ['tsconfig.json'],
createDefaultProgram: true
},
plugins: ['@typescript-eslint', 'jsdoc', 'import'],
plugins: ['@typescript-eslint', 'jsdoc', 'import', 'deprecation'],
extends: [
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
Expand All @@ -30,19 +30,19 @@ module.exports = {
}
],
'@angular-eslint/component-class-suffix': [
'error',
'off',
{
suffixes: ['Directive', 'Component', 'Base', 'Widget', 'Property']
suffixes: ['Directive', 'Component', 'Base', 'Widget', 'Property', 'HarnessTest']
}
],
'@angular-eslint/directive-class-suffix': [
'error',
'off',
{
suffixes: ['Directive', 'Component', 'Base', 'Widget']
}
],
'@angular-eslint/directive-selector': [
'error',
'off',
{
type: 'attribute',
prefix: ['nz']
Expand Down Expand Up @@ -112,6 +112,13 @@ module.exports = {
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowConciseArrowFunctionExpressionsStartingWithVoid: true
}
],
'prefer-arrow/prefer-arrow-functions': 'off',
'import/no-duplicates': 'error',
'import/no-unused-modules': 'error',
Expand All @@ -124,7 +131,7 @@ module.exports = {
groups: [['builtin', 'external'], 'internal', ['parent', 'sibling', 'index']],
pathGroups: [
{
pattern: '{@angular/**,rxjs,rxjs/operators}',
pattern: '{@angular/**,rxjs}',
group: 'external',
position: 'before'
},
Expand Down Expand Up @@ -163,13 +170,17 @@ module.exports = {
'no-shadow': 'off',
'@angular-eslint/no-input-rename': 'off',
'prefer-const': 'off',
'max-len': 'off'
'max-len': 'off',
'deprecation/deprecation': 'warn',
'jsdoc/newline-after-description': 'off'
}
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {}
rules: {
"@angular-eslint/template/prefer-self-closing-tags": "error"
}
},
{
files: ['*.html'],
Expand All @@ -178,6 +189,10 @@ module.exports = {
rules: {
'prettier/prettier': ['error', { parser: 'angular' }]
}
},
{
files: ['*.js'],
parserOptions: { sourceType: 'module' }
}
]
};
48 changes: 20 additions & 28 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,48 @@
name: Deploy
name: deploy

on: push

jobs:
website:
if: "startsWith(github.event.commits[0].message, 'release')"
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.15.0

- name: checkout
uses: actions/checkout@master
uses: actions/checkout@v4

- name: install
run: npm install
- uses: borales/actions-yarn@v3.0.0
with:
cmd: install

- name: build
# 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 --base-href /delon/
npm run site:helper
npm run site:minify
yarn run site:build
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
- name: deploy-to-gh-pages
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./src/dist/browser
uses: peaceiris/actions-gh-pages@v3
# env:
# # PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PUBLISH_BRANCH: gh-pages
# PUBLISH_DIR: ./src/dist/browser
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./src/dist/browser
emptyCommits: false

- name: deploy-to-surge-pre
uses: jacobtomlinson/gha-find-replace@master
with:
find: '/delon/'
replace: '/'
include: '\.html$'

- name: deploy-to-surge
uses: dswistowski/surge-sh-action@v1
with:
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
domain: https://ng-alain-doc.surge.sh
project: ./src/dist/browser

- uses: actions/checkout@v1
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: git@gitee.com:ng-alain/delon.git
ssh_private_key: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
42 changes: 42 additions & 0 deletions .github/workflows/docker-build-doc-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: docker-build-doc-site

on:
push:
branches:
- master

jobs:
website:
if: "startsWith(github.event.commits[0].message, 'release')"
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.15.0

- name: checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login Docker
uses: docker/login-action@v2
with:
# registry: registry.gitlab.com
# username: ${{ secrets.GITLAB_USERNAME }}
# password: ${{ secrets.GITLAB_PASSWORD }}
# Docker Hub
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.docs
push: true
tags:
cipchk/ng-alain-docs:latest
# registry.gitlab.com/ng-alain/images:docs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GiteeMirror
name: mirror gitee

on: push

Expand All @@ -7,7 +7,9 @@ jobs:
if: "!startsWith(github.event.commits[0].message, 'release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: git@gitee.com:ng-alain/delon.git
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/ssr.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ yarn-error.log
debug.log
__ngcc_entry_points__.json
report.*.json
/.angular/cache
/.husky/_

src/app/routes/gen
src/assets/color.less
Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.1
16.15.0
14 changes: 6 additions & 8 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
_freak.less
_functions.less
_spacing.less
_border.less
_color.less
_badge.less
_half-float.less
src/assets/color.less
packages/theme/system/mixins/**/*
src/assets/**/*

packages/theme/system/utils/_border.less
packages/theme/system/utils/_color.less
packages/theme/system/utils/_spacing.less
45 changes: 38 additions & 7 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-rational-order",
"stylelint-config-prettier"
"stylelint-config-rational-order"
],
"customSyntax": "postcss-less",
"plugins": [
"stylelint-order",
"stylelint-declaration-block-no-ignored-properties"
],
"rules": {
"function-name-case": ["lower", { "ignoreFunctions": ["/colorPalette/"] }],
"function-no-unknown": [
true,
{
"ignoreFunctions": [
"fade",
"tint",
"darken",
"ceil",
"fadein",
"floor",
"unit",
"shade",
"lighten",
"percentage",
"-",
"~`colorPalette",
"snaplist",
"fade-out"
]
}
],
"no-descending-specificity": null,
"no-invalid-position-at-import-rule": null,
"declaration-empty-line-before": null,
"keyframes-name-pattern": null,
"custom-property-pattern": null,
"number-max-precision": 8,
"alpha-value-notation": "number",
"color-function-notation": "legacy",
"selector-class-pattern": null,
"selector-id-pattern": null,
"plugin/declaration-block-no-ignored-properties": true,
"selector-type-no-unknown": null,
"selector-pseudo-element-no-unknown": [
Expand All @@ -20,9 +51,9 @@
]
}
],
"no-invalid-position-at-import-rule": null
},
"ignoreFiles": [
"src/assets/**/*"
]
"no-invalid-double-slash-comments": null,
"import-notation": "string",
"media-feature-range-notation": "prefix",
"media-query-no-invalid": null
}
}
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"sourceMaps": true,
"internalConsoleOptions": "openOnSessionStart",
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/schematics/tsconfig.json"
"TS_NODE_PROJECT": "${workspaceFolder}/schematics/tsconfig.spec.json"
},
"args": ["${workspaceFolder}/schematics/test.ts"]
}
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@
"[jsonc]": {
"editor.formatOnSave": false
},
"[yaml]": {
"editor.formatOnSave": false
},
"files.associations": {
"*.json": "jsonc",
".prettierrc": "json",
".stylelintrc": "json"
}
},
"angular.enable-strict-mode-prompt": false
}
Loading

0 comments on commit 6dbee13

Please sign in to comment.