Skip to content

Commit

Permalink
chore: chore code to ng17
Browse files Browse the repository at this point in the history
  • Loading branch information
devcui committed Feb 18, 2024
1 parent ebb1144 commit b30bbad
Show file tree
Hide file tree
Showing 213 changed files with 2,615 additions and 3,286 deletions.
4 changes: 0 additions & 4 deletions .angulardoc.json

This file was deleted.

2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ node_modules/

# yarn v2
.yarn

**/src/index.html
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module.exports = {
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {
"@angular-eslint/template/prefer-self-closing-tags": "error"
}
},
{
Expand Down
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These are supported funding model platforms

github: yunzai-bot
open_collective: ng-yunzai
custom: # Replace with a single custom sponsorship URL
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ contact_links:
about: The issue which is not created via issue-helper will be closed immediately.
- name: 报告问题
url: https://ng.yunzainfo.com/issue-helper/index.html#zh
about: 注意:不是用 issue-helper 创建的 issue 会被立即关闭。
about: 注意:不是用 issue-helper 创建的 issue 会被立即关闭。使用问题请加QQ Group:428749721
86 changes: 43 additions & 43 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
## PR Checklist
Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our guidelines: https://github.com/hbyunzai/ng-yunzai/blob/master/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)


## PR Type
What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->
```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:
```

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A


## What is the new behavior?


## Does this PR introduce a breaking change?
```
[ ] Yes
[ ] No
```

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->


## Other information
## PR Checklist
Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our guidelines: https://github.com/hbyunzai/ng-yunzai/blob/master/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)


## PR Type
What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->
```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:
```

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A


## What is the new behavior?


## Does this PR introduce a breaking change?
```
[ ] Yes
[ ] No
```

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->


## Other information
127 changes: 127 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI

on:
push:
branches-ignore:
- gh-pages

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Comment on github
run: node ./scripts/_ci/github-comment.js "RELEASE" "[Using release @yelon, Preview Preparing...](https://github.com/hbyunzai/ng-yunzai/actions/runs/${{ github.run_id }})"
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
PR_NUMBER: ${{ github.event.number || steps.findPr.outputs.pr }}
- name: Install node modules
run: yarn install
- name: Build
run: ./scripts/_ci/deploy-pipelines.sh
- name: 'Deploy Site'
run: |
export DEPLOY_DOMAIN=https://preview-${{ github.event.number || steps.findPr.outputs.pr }}-ng-yunzai.surge.sh
echo "Deploy to $DEPLOY_DOMAIN"
cp ./dist/browser/index.html ./dist/browser/404.html
npx surge --project ./dist/browser --domain $DEPLOY_DOMAIN
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
- name: 'Update comment on github'
run: |
export DEPLOY_DOMAIN=https://preview-${{ github.event.number || steps.findPr.outputs.pr }}-ng-yunzai.surge.sh
node ./scripts/_ci/github-comment.js "RELEASE" "[Preview is ready!]($DEPLOY_DOMAIN)"
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
PR_NUMBER: ${{ github.event.number || steps.findPr.outputs.pr }}
- name: 'When failed'
if: failure()
run: node ./scripts/_ci/github-comment.js "RELEASE" "[Using release @yelon, Preview Failed](https://github.com/hbyunzai/ng-yunzai/actions/runs/${{ github.run_id }})"
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
PR_NUMBER: ${{ github.event.number || steps.findPr.outputs.pr }}

build-day:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Comment on github
run: node ./scripts/_ci/github-comment.js "RELEASE_DAY" "[Using day release @yelon, Preview Preparing...](https://github.com/hbyunzai/ng-yunzai/actions/runs/${{ github.run_id }})"
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
PR_NUMBER: ${{ github.event.number || steps.findPr.outputs.pr }}
- name: Install node modules
run: yarn install
- name: Build
run: ./scripts/_ci/deploy-pipelines.sh -day
- name: 'Deploy Site'
run: |
export DEPLOY_DOMAIN=https://preview-${{ github.event.number || steps.findPr.outputs.pr }}-day-ng-yunzai.surge.sh
echo "Deploy to $DEPLOY_DOMAIN"
cp ./dist/browser/index.html ./dist/browser/404.html
npx surge --project ./dist/browser --domain $DEPLOY_DOMAIN
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
- name: 'Update comment on github'
run: |
export DEPLOY_DOMAIN=https://preview-${{ github.event.number || steps.findPr.outputs.pr }}-day-ng-yunzai.surge.sh
node ./scripts/_ci/github-comment.js "RELEASE_DAY" "[Using day release @yelon, Preview is ready!]($DEPLOY_DOMAIN)"
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
PR_NUMBER: ${{ github.event.number || steps.findPr.outputs.pr }}
- name: 'When failed'
if: failure()
run: node ./scripts/_ci/github-comment.js "RELEASE" "[Using day release @yelon, Preview Failed](https://github.com/hbyunzai/ng-yunzai/actions/runs/${{ github.run_id }})"
env:
ACCESS_REPO: ${{ github.repository }}
ACCESS_TOKEN: ${{ secrets.CI_TOKEN }}
PR_NUMBER: ${{ github.event.number || steps.findPr.outputs.pr }}

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install node modules
run: yarn install
- name: Check code lint
run: yarn run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install node modules
run: yarn install
- name: Check code lint
run: npx ng test --no-progress --browsers=ChromeHeadless --code-coverage --no-watch
6 changes: 3 additions & 3 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
domain: https://ng-yunzai.surge.sh
project: ./dist
project: ./dist/browser

- name: Replace base href for gh-pages
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '<base href="/">'
replace: '<base href="/ng-yunzai">'
replace: '<base href="/ng-yunzai/">'
include: '*.html'
regex: false

Expand All @@ -44,6 +44,6 @@ jobs:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist
PUBLISH_DIR: ./dist/browser
with:
emptyCommits: false
File renamed without changes.
36 changes: 17 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
# /src/assets/color.less
yelon-builds
scripts/var.less
# src/assets/style.dark.css
# src/assets/style.compact.css
/bazel-out

# dependencies
# Node
/node_modules
/yarn.lock
npm-debug.log
yarn-error.log

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
# Miscellaneous
/.angular/cache
/.sass-cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings
yarn-error.log
/_all.less

# e2e
/e2e/*.map

# System Files
# System files
.DS_Store
Thumbs.db

# lock
/pnpm-lock.yaml
/yarn.lock

/yelon-builds
Empty file modified .husky/pre-commit
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://pnpm.io/npmrc#node-linker
node-linker=hoisted
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.0
18.18.0
40 changes: 0 additions & 40 deletions .stylelintrc

This file was deleted.

Loading

0 comments on commit b30bbad

Please sign in to comment.