Skip to content

Commit f850f53

Browse files
committed
chore: use npm workspaces.
1 parent 17ecbd5 commit f850f53

File tree

10 files changed

+55896
-42
lines changed

10 files changed

+55896
-42
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66

77
jobs:
88
build-deploy:
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v2
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
1313
with:
14-
node-version: 14
14+
node-version: 16
1515

1616
- name: Look Changelog
17-
uses: jaywcjlove/changelog-generator@v1.4.8
17+
uses: jaywcjlove/changelog-generator@main
1818
with:
1919
token: ${{ secrets.GITHUB_TOKEN }}
2020
filter-author: (小弟调调™|Renovate Bot)
@@ -29,14 +29,9 @@ jobs:
2929
- run: markdown-to-html -s packages/core/README.md --output packages/core/docs/index.html
3030
- run: markdown-to-html -s README-zh.md --output packages/core/docs/index.zh.html
3131

32-
- run: npm run build
33-
working-directory: example/create-react-app
34-
35-
- run: npm run build
36-
working-directory: example/build
37-
38-
- run: npm run build
39-
working-directory: example/webpack
32+
- run: npm run example:create-react-app
33+
- run: npm run example:typescript
34+
- run: npm run example:webpack
4035

4136
- name: Generate Contributors Images
4237
uses: jaywcjlove/github-action-contributors@main
@@ -47,13 +42,13 @@ jobs:
4742

4843
- name: Is a tag created auto?
4944
id: create_tag
50-
uses: jaywcjlove/create-tag-action@v1.3.6
45+
uses: jaywcjlove/create-tag-action@main
5146
with:
5247
package-path: ./packages/core/package.json
5348

5449
- name: get tag version
5550
id: tag_version
56-
uses: jaywcjlove/changelog-generator@v1.5.0
51+
uses: jaywcjlove/changelog-generator@main
5752

5853
- name: Deploy
5954
uses: peaceiris/actions-gh-pages@v3
@@ -64,7 +59,7 @@ jobs:
6459

6560
- name: Generate Changelog
6661
id: changelog
67-
uses: jaywcjlove/changelog-generator@v1.5.0
62+
uses: jaywcjlove/changelog-generator@main
6863
if: steps.create_tag.outputs.successful
6964
with:
7065
head-ref: ${{ steps.create_tag.outputs.version }}

example/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "base",
2+
"name": "@example/base",
33
"version": "1.0.0",
44
"description": "",
55
"private": true,

example/create-react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "create-react-app",
2+
"name": "@example/create-react-app",
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
@@ -8,7 +8,7 @@
88
"@testing-library/user-event": "~14.4.3",
99
"react": "~18.2.0",
1010
"react-dom": "~18.2.0",
11-
"react-scripts": "~5.0.0"
11+
"react-scripts": "~5.0.1"
1212
},
1313
"devDependencies": {
1414
"mocker-api": "2.9.5"

example/express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "express-demo",
2+
"name": "@example/express",
33
"version": "1.0.0",
44
"description": "",
55
"private": true,

example/loadData/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "load-data",
2+
"name": "@example/load-data",
33
"version": "1.0.0",
44
"description": "",
55
"private": true,

example/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "typescript",
2+
"name": "@example/typescript",
33
"version": "1.0.0",
44
"private": true,
55
"description": "",

example/webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "webpack",
2+
"name": "@example/webpack",
33
"version": "1.0.0",
44
"private": true,
55
"description": "Mocker API Example",

lerna.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": "2.9.5",
3+
"packages": ["packages/*", "example/*"],
4+
"useWorkspaces": true
5+
}

0 commit comments

Comments
 (0)