Skip to content

Commit b92448b

Browse files
committed
Move react-scripts from main package to example
- Remove support for development under Node 10 and Node 12 - Move react-scripts dependency from main package to example - Fix other misc. dependency issues
1 parent 5be8d4b commit b92448b

File tree

9 files changed

+45045
-29901
lines changed

9 files changed

+45045
-29901
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env", "@babel/preset-flow", "@babel/preset-react"]
3+
}

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
jest.config.js
12
dist/
23
example/build/
34
node_modules/
45
.snapshots/
56
*.min.js
6-
flow-libdef/
7+
flow-libdef/

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Default flow options are good for most use cases, so this is left blank.
22
[ignore]
3+
.*/node_modules/resolve/test/resolver/malformed_package_json/.*
34
.*/example/.*
45
.*/flow-libdef/.*
56

.github/workflows/ci.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ jobs:
5959
fail-fast: false
6060
matrix:
6161
node_version:
62-
- 10
63-
- 12
6462
- 14
6563
- 16
6664
os:
@@ -75,8 +73,20 @@ jobs:
7573
node-version: ${{ matrix.node_version }}
7674
- run: npm ci
7775
- run: npm run-s build
78-
- run: npm install --prefix example
79-
- run: npm run --prefix example build
76+
- working-directory: ./example
77+
run: npm install
78+
- working-directory: ./example
79+
run: npm run build
80+
- if: matrix.os == 'ubuntu-latest' && matrix.node_version == 16 && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event.action == 'published')
81+
uses: actions/upload-artifact@v2
82+
with:
83+
name: dist
84+
path: dist
85+
- if: matrix.os == 'ubuntu-latest' && matrix.node_version == 16 && github.event_name == 'push' && github.ref == 'refs/heads/main'
86+
uses: actions/upload-artifact@v2
87+
with:
88+
name: example-app
89+
path: example/build
8090
deploy:
8191
needs:
8292
- lint
@@ -93,9 +103,15 @@ jobs:
93103
with:
94104
node-version: 16
95105
- run: npm ci
96-
- run: npm run-s build
97-
- run: npm install --prefix example
98-
- run: npm run --prefix example build
106+
- uses: actions/download-artifact@v2
107+
with:
108+
name: dist
109+
- working-directory: ./example
110+
run: npm install
111+
- uses: actions/download-artifact@v2
112+
with:
113+
name: example-app
114+
path: example
99115
- uses: peaceiris/actions-gh-pages@v3
100116
with:
101117
personal_token: ${{ secrets.GH_PAGES_DEPLOY_TOKEN }}
@@ -119,7 +135,9 @@ jobs:
119135
registry-url: https://registry.npmjs.org/
120136
node-version: 16
121137
- run: npm ci
122-
- run: npm run-s build
138+
- uses: actions/download-artifact@v2
139+
with:
140+
name: dist
123141
- run: npm publish --access public
124142
env:
125143
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)