Skip to content

Commit 7b64ab3

Browse files
committed
[add] Initialization script & action of GitHub template repository
[optimize] update Upstream packages
1 parent 67b01fd commit 7b64ab3

8 files changed

Lines changed: 370 additions & 392 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Template Repository initialization
2+
on:
3+
push:
4+
branches:
5+
- master
6+
env:
7+
TEMPLATE_OWNER: idea2app
8+
TEMPLATE_NAME: React-MobX-Ant-Design-ts
9+
10+
jobs:
11+
replace-repository-name:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- if: github.repository != format('{0}/{1}', env.TEMPLATE_OWNER, env.TEMPLATE_NAME)
17+
run: |
18+
sh .github/workflows/replace-repository-name.sh \
19+
${{ env.TEMPLATE_OWNER }} ${{ env.TEMPLATE_NAME }} \
20+
${{ github.repository_owner }} ${{ github.event.repository.name }}
21+
rm -f .github/workflows/init-template.yml
22+
23+
- uses: stefanzweifel/git-auto-commit-action@v5
24+
with:
25+
commit_message: '[fix] replace Repository Name'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /usr/bin/env bash
2+
3+
SourceOwner=$1
4+
SourceName=$2
5+
TargetOwner=$3
6+
TargetName=$4
7+
8+
sed -i "s/$SourceOwner\/$SourceName/$TargetOwner\/$TargetName/ig" \
9+
$(grep -i $SourceOwner/$SourceName -rl . --exclude-dir=.git --exclude-dir=node_modules)
10+
sed -i "s/$SourceName/$TargetName/ig" \
11+
$(grep -i $SourceName -rl . --exclude-dir=.git --exclude-dir=node_modules)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# React-MobX-Ant-Design.ts
1+
# React-MobX-Ant-Design-ts
22

33
[React][1] project scaffold based on [TypeScript][2], [MobX][3] & [Ant Design][4],
44
which is inspired by [WebCell scaffold][5].

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@
1111
"url": "https://github.com/idea2app/React-MobX-Ant-Design-ts/issues"
1212
},
1313
"dependencies": {
14-
"@ant-design/cssinjs": "^1.20.0",
14+
"@ant-design/cssinjs": "^1.21.0",
1515
"@ant-design/icons": "^5.3.7",
16-
"antd": "^5.18.0",
16+
"antd": "^5.18.3",
1717
"browser-unhandled-rejection": "^1.0.2",
1818
"koajax": "^1.1.2",
1919
"lodash": "^4.17.21",
20-
"mobx": "^6.12.3",
21-
"mobx-github": "^0.3.1",
20+
"mobx": "^6.12.4",
21+
"mobx-github": "^0.3.2",
2222
"mobx-i18n": "^0.5.0",
2323
"mobx-react": "^9.1.1",
2424
"mobx-react-helper": "^0.3.1",
25-
"mobx-restful": "^1.0.0-rc.6",
25+
"mobx-restful": "^1.0.0",
2626
"mobx-restful-table": "^2.0.0-rc.1",
2727
"preact": "^10.22.0",
28-
"react-router": "^6.23.1",
28+
"react-router": "^6.24.0",
2929
"react-router-class-tools": "^0.1.3",
30-
"react-router-dom": "^6.23.1",
30+
"react-router-dom": "^6.24.0",
3131
"web-utility": "^4.4.0"
3232
},
3333
"devDependencies": {
3434
"@parcel/config-default": "~2.12.0",
3535
"@parcel/packager-raw-url": "~2.12.0",
3636
"@parcel/transformer-typescript-tsc": "~2.12.0",
3737
"@parcel/transformer-webmanifest": "~2.12.0",
38-
"@types/lodash": "^4.17.4",
39-
"@types/node": "^18.19.34",
38+
"@types/lodash": "^4.17.5",
39+
"@types/node": "^18.19.39",
4040
"husky": "^9.0.11",
41-
"lint-staged": "^15.2.5",
41+
"lint-staged": "^15.2.7",
4242
"parcel": "~2.12.0",
43-
"prettier": "^3.3.1",
43+
"prettier": "^3.3.2",
4444
"process": "^0.11.10",
45-
"typescript": "~5.4.5",
45+
"typescript": "~5.5.2",
4646
"workbox-cli": "^7.1.0"
4747
},
4848
"alias": {
@@ -63,7 +63,7 @@
6363
"prepare": "husky",
6464
"test": "lint-staged",
6565
"clean": "rm -rf .parcel-cache/ dist/",
66-
"start": "npm run clean && parcel src/index.html --open",
66+
"start": "npm run clean && parcel src/index.html",
6767
"pack": "npm run clean && parcel build src/index.html --public-url .",
6868
"build": "npm run pack && workbox generateSW"
6969
}

0 commit comments

Comments
 (0)