Skip to content

Commit 9cc4a45

Browse files
authored
Merge branch 'main' into button-component
2 parents 5d0ad3b + 0d02154 commit 9cc4a45

File tree

38 files changed

+1360
-469
lines changed

38 files changed

+1360
-469
lines changed

.github/workflows/publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
publish:
10+
if: "contains(github.event.head_commit.message, '[publish]')"
11+
12+
runs-on: macos-latest
13+
14+
env:
15+
DEFAULT_PYTHON: 3.8
16+
PIPELINE_CONTEXT: DEV
17+
PIPELINE_LIBRARY_PATH: ${{ github.workspace }}/.github/library
18+
19+
steps:
20+
# Checkout your source repo (must do this before the library)
21+
- name: Checkout source Git repo
22+
uses: actions/checkout@v3
23+
24+
# Setup .npmrc file to publish to npm
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: '16.x'
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Cache node modules
31+
uses: actions/cache@v3
32+
env:
33+
cache-name: cache-node-modules
34+
with:
35+
# npm cache files are stored in `~/.npm` on Linux/macOS
36+
path: ~/.npm
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-build-${{ env.cache-name }}-
40+
${{ runner.os }}-build-
41+
${{ runner.os }}-
42+
43+
- name: Install dependencies
44+
run: yarn install
45+
46+
- name: Run prepublish (tests and build)
47+
run: yarn ci
48+
49+
- name: Publish React Ape package
50+
run: cd ./packages/react-ape && yarn publish
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Run Tests
22

3-
on: push
3+
on: [push, pull_request]
44

55
jobs:
66
build:

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
## [Check the Docs (raphamorim.io/react-ape)](https://raphamorim.io/react-ape)
88

9+
## [Join our Discord](https://discord.gg/njHHfRzJ42)
10+
911
### DISCLAIMER: In experimental stage
1012

1113
React Ape is a react renderer to build UI interfaces using canvas/WebGL. React Ape was built to be an optional [React-TV](https://github.com/raphamorim/react-tv) renderer. It's mainly a renderer focused on creating things for TV, PS5, PS4, Nintendo Switch, PS Vita, PS3 and low memory devices.
@@ -69,7 +71,11 @@ class ReactApeComponent extends Component {
6971

7072
## Demo on PS Vita
7173

72-
<img alt='Demo PS Vita' src='assets/demo-ps-vita.jpg' height='330px' />
74+
![Demo on PS Vita](assets/demo-ps-vita.jpg)
75+
76+
## Demo on TV
77+
78+
![Demo on TV](assets/demo-tv.png)
7379

7480
## Testing it
7581

assets/demo-ps-vita.jpg

348 KB
Loading

assets/demo-tv.png

1010 KB
Loading

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,21 @@
3434
"@babel/preset-react": "7.16.7",
3535
"@babel/register": "7.17.7",
3636
"babel-jest": "27.5.1",
37-
"babel-loader": "8.0.5",
3837
"babel-polyfill": "6.26.0",
3938
"canvas": "2.9.0",
4039
"chalk": "2.4.1",
4140
"docusaurus": "2.0.0-alpha.66",
42-
"flow-bin": "0.174.1",
43-
"flow-typed": "3.7.0",
41+
"flow-bin": "0.182.0",
42+
"flow-typed": "3.8.0",
4443
"glob": "7.1.2",
4544
"google-closure-compiler": "20220301.0.0",
4645
"jest": "27.5.1",
4746
"jsdom": "19.0.0",
4847
"lerna": "4.0.0",
49-
"prettier": "1.5.3",
50-
"react": "18.1.0",
51-
"react-reconciler": "0.28.0",
52-
"react-test-renderer": "18.1.0",
48+
"prettier": "2.7.1",
49+
"react": "18.2.0",
50+
"react-reconciler": "0.29.0",
51+
"react-test-renderer": "18.2.0",
5352
"rollup": "0.62.0",
5453
"rollup-plugin-babel": "4.3.2",
5554
"rollup-plugin-commonjs": "9.1.3",

packages/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"webpack": "5.70.0",
1717
"webpack-cli": "4.9.2",
1818
"webpack-dev-server": "4.7.4",
19+
"babel-loader": "8.2.5",
1920
"html-webpack-plugin": "5.5.0"
2021
}
2122
}

packages/app/src/Clock.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,7 @@ class Clock extends React.Component {
5151
<Text style={styles.time}>
5252
{this.state.time}
5353
</Text>
54-
55-
{/*<Text style={styles.time}>
56-
{this.state.time}
57-
</Text>
58-
<Text style={styles.time}>
59-
{this.state.time}
60-
</Text>*/}
54+
6155
</View>
6256
);
6357
}

packages/app/src/Sidebar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class Item extends React.Component {
4040
style={{
4141
color: focused ? '#331A00' : 'white',
4242
fontSize: 24,
43-
}}>
43+
}}
44+
>
4445
{text}
4546
</Text>
4647
</View>

packages/app/src/Slideshow.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@ function Slideshow() {
4040
}
4141
}
4242

43-
React.useEffect(
44-
() => {
45-
resetTimeout();
46-
timeoutRef.current = setTimeout(
47-
() =>
48-
setCurrentSlide(prev => (prev === slides.length - 1 ? 0 : prev + 1)),
49-
delay
50-
);
43+
React.useEffect(() => {
44+
resetTimeout();
45+
timeoutRef.current = setTimeout(
46+
() =>
47+
setCurrentSlide((prev) => (prev === slides.length - 1 ? 0 : prev + 1)),
48+
delay
49+
);
5150

52-
return () => {
53-
resetTimeout();
54-
};
55-
},
56-
[currentSlide]
57-
);
51+
return () => {
52+
resetTimeout();
53+
};
54+
}, [currentSlide]);
5855

5956
return (
6057
<View style={{...styles.slideshow}}>

packages/react-ape/__tests__/render-tests/__snapshots__/render-updates.js.snap

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

packages/react-ape/__tests__/render-tests/render-updates.js

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

0 commit comments

Comments
 (0)