Skip to content

Commit 29c3f82

Browse files
committed
[add] Initialization script & action of GitHub template repository
[optimize] update Upstream packages
1 parent 6d818ef commit 29c3f82

File tree

7 files changed

+221
-282
lines changed

7 files changed

+221
-282
lines changed

.github/workflows/init-template.yml

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-Bootstrap-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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](src/image/logo.png)
22

3-
# React-MobX-Bootstrap.ts
3+
# React-MobX-Bootstrap-ts
44

55
[React][1] project scaffold based on [TypeScript][2], [MobX][3] & [Bootstrap][4], which is inspired by [WebCell scaffold][5].
66

@@ -36,9 +36,9 @@
3636
1. [Probot settings][16]: set up Issue labels & Pull Request rules
3737
2. [PR badge][17]: set up Online [VS Code][18] editor entries in Pull Request description
3838

39-
2. Click the **[Use this template][19] button** on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above
39+
2. Click the **[<kbd>Use this template</kbd>][19] button** on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above
4040

41-
3. Click the **[Open in GitHub codespaces][7] button** on the top of ReadMe file, then an **online VS Code development environment** will be started immediately
41+
3. Click the **[<kbd>Open in GitHub codespaces</kbd>][7] button** on the top of ReadMe file, then an **online VS Code development environment** will be started immediately
4242

4343
4. Set [Vercel variables][20] as [Repository secrets][21], then every commit will get an independent **Preview URL**
4444

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
"idea-react": "^2.0.0-rc.2",
2020
"koajax": "^1.1.2",
2121
"lodash": "^4.17.21",
22-
"mobx": "^6.12.3",
22+
"mobx": "^6.12.4",
2323
"mobx-github": "^0.3.2",
2424
"mobx-i18n": "^0.5.0",
2525
"mobx-react": "^9.1.1",
26-
"mobx-restful": "^1.0.0-rc.6",
26+
"mobx-restful": "^1.0.0",
2727
"mobx-restful-table": "^2.0.0-rc.1",
2828
"preact": "^10.22.0",
29-
"react-bootstrap": "^2.10.2",
29+
"react-bootstrap": "^2.10.3",
3030
"react-bootstrap-editor": "^2.0.4",
3131
"react-editor-js": "^2.1.0",
3232
"react-router-class-tools": "^0.1.3",
33-
"react-router-dom": "^6.23.1",
33+
"react-router-dom": "^6.24.0",
3434
"web-utility": "^4.4.0"
3535
},
3636
"devDependencies": {
@@ -41,16 +41,16 @@
4141
"@parcel/transformer-typescript-tsc": "~2.12.0",
4242
"@parcel/transformer-webmanifest": "~2.12.0",
4343
"@types/lodash": "^4.17.5",
44-
"@types/node": "^18.19.34",
44+
"@types/node": "^18.19.39",
4545
"buffer": "^6.0.3",
4646
"husky": "^9.0.11",
4747
"lint-staged": "^15.2.7",
4848
"parcel": "~2.12.0",
49-
"parcel-transformer-mdx": "^0.3.2",
49+
"parcel-transformer-mdx": "^0.3.3",
5050
"prettier": "^3.3.2",
5151
"prismjs": "^1.29.0",
5252
"process": "^0.11.10",
53-
"typescript": "~5.4.5",
53+
"typescript": "~5.5.2",
5454
"workbox-cli": "^7.1.0"
5555
},
5656
"alias": {

0 commit comments

Comments
 (0)