Skip to content

Commit de99fd0

Browse files
authored
chore: standardize rc footer config (#145)
* chore: standardize rc footer config * test: add testing library dom peer * docs: center README title * chore: address AI review feedback * docs: standardize README release details * docs: clarify Ant Design ecosystem note * docs: refine README usage and ecosystem note * ci: isolate surge preview token * chore: address review comments * docs: update Ant Design logo * docs: add Chinese README * docs: refine bilingual README branding * chore: standardize rc tooling and docs * chore: address standardization review comments * chore: include father config in type checks * ci: update GitHub Actions versions * ci: use resolvable CodeQL action ref * docs: add license file * ci: use test-utoo workflow from main * ci: use actions checkout v7 * chore: standardize package metadata * ci: standardize dependabot updates * docs: fix Chinese README API names * docs: localize Chinese README descriptions * chore: refine preview workflow ignores * docs: polish Chinese README wording * chore: align tooling ignores and typescript * docs: document dumi dev server port * chore: standardize husky configuration * docs: align readme badge layout * chore: standardize package type entry * docs: normalize readme badges * ci: limit reusable workflow secrets * ci: restore reusable workflow compatibility * chore: limit reusable workflow secrets
1 parent 8578d00 commit de99fd0

21 files changed

Lines changed: 566 additions & 170 deletions

.dumirc.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1+
import path from 'path';
12
import { defineConfig } from 'dumi';
23

34
const basePath = process.env.GH_PAGES ? '/footer/' : '/';
4-
const publicPath = process.env.GH_PAGES ? '/footer/' : '/';
5+
const publicPath = basePath;
56

67
export default defineConfig({
78
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
89
themeConfig: {
910
name: 'Footer',
1011
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
1112
},
12-
outputPath: '.doc',
13+
outputPath: 'docs-dist',
14+
alias: {
15+
'@rc-component/footer/assets/index.css': path.resolve(
16+
__dirname,
17+
'assets/index.less',
18+
),
19+
'rc-footer/assets/index.css': path.resolve(__dirname, 'assets/index.less'),
20+
'@rc-component/footer$': path.resolve(__dirname, 'src'),
21+
'rc-footer$': path.resolve(__dirname, 'src'),
22+
},
1323
exportStatic: {},
1424
base: basePath,
1525
publicPath,

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: ant-design
2+
open_collective: ant-design

.github/dependabot.yml

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "21:00"
8-
open-pull-requests-limit: 10
9-
ignore:
10-
- dependency-name: husky
11-
versions:
12-
- 5.0.9
13-
- 5.1.1
14-
- 5.1.2
15-
- 5.1.3
16-
- 5.2.0
17-
- dependency-name: "@types/react-dom"
18-
versions:
19-
- 17.0.0
20-
- 17.0.1
21-
- 17.0.2
22-
- dependency-name: "@types/react"
23-
versions:
24-
- 17.0.0
25-
- 17.0.1
26-
- 17.0.2
27-
- 17.0.3
28-
- dependency-name: react-dom
29-
versions:
30-
- 17.0.1
31-
- dependency-name: less
32-
versions:
33-
- 4.1.0
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: '21:00'
9+
timezone: Asia/Shanghai
10+
open-pull-requests-limit: 10
11+
12+
- package-ecosystem: github-actions
13+
directory: '/'
14+
schedule:
15+
interval: weekly
16+
day: monday
17+
time: '21:00'
18+
timezone: Asia/Shanghai
19+
open-pull-requests-limit: 10

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '31 18 * * 2'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [javascript]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v7
28+
with:
29+
persist-credentials: false
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
33+
with:
34+
languages: ${{ matrix.language }}
35+
queries: +security-and-quality
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
42+
with:
43+
category: '/language:${{ matrix.language }}'

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ✅ test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
15+
secrets:
16+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/react-doctor.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: React Doctor
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
concurrency:
12+
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
react-doctor:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v7
20+
with:
21+
persist-credentials: false
22+
23+
- uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
24+
with:
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Surge Preview
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
statuses: write
11+
12+
concurrency:
13+
group: surge-preview-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
preview:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v7
21+
with:
22+
persist-credentials: false
23+
- name: Check Surge token
24+
id: surge-token
25+
env:
26+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
27+
run: |
28+
if [ -n "$SURGE_TOKEN" ]; then
29+
echo "enabled=true" >> "$GITHUB_OUTPUT"
30+
else
31+
echo "enabled=false" >> "$GITHUB_OUTPUT"
32+
fi
33+
34+
- name: Install dependencies
35+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
36+
run: npm install --ignore-scripts --no-audit --loglevel=warn
37+
38+
- name: Build preview
39+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
40+
run: npm run build
41+
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
42+
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
43+
env:
44+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
45+
with:
46+
dist: docs-dist
47+
failOnError: false
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
surge_token: ${{ env.SURGE_TOKEN }}

.github/workflows/test.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ yarn.lock
2828
package-lock.json
2929
pnpm-lock.yaml
3030
coverage/
31-
.doc
31+
docs-dist
3232

3333
# dumi
3434
.dumi/tmp
3535
.dumi/tmp-test
3636
.dumi/tmp-production
3737
.env.local
38+
.vercel

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
npx pretty-quick --staged
1+
npx lint-staged

0 commit comments

Comments
 (0)