Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit a54f30d

Browse files
committed
release: react-tv 0.3.0-alpha.1
- migrate to react-reconciler 0.6.0 - check if is need to format code on CI - add benchmark example - fix update render tor nodeText - update postinstall to prebublishOnly (newest npm) - remove: react-tv run-webos-dev - react-tv cli {init} breaking changes
1 parent b73afdc commit a54f30d

File tree

12 files changed

+85
-302
lines changed

12 files changed

+85
-302
lines changed

Diff for: CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 0.3.0-alpha.1
2+
3+
- migrate to react-reconciler 0.6.0
4+
- check if is need to format code on CI
5+
- add benchmark example
6+
- fix update render tor nodeText
7+
- update postinstall to prebublishOnly (newest npm)
8+
- remove: react-tv run-webos-dev
9+
- react-tv cli {init} breaking changes
10+
111
# 0.2.3
212

313
- use ReactReconciler from `react-reconciler` instead from `react-dom`

Diff for: README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,16 @@ In addition: Unify the build for multiple TV platforms.
7777
| Operation | React-TV | React-DOM | Runned off |
7878
| ------------- | ------------- | ------------- | ------------- |
7979
| Time of first render | ~76ms | ~199ms | Firefox 57 (Quantum) |
80-
| Time of first render | ~364ms | ~234ms | WebOS 3.0 Emulator |
80+
| Time of first render | ~364ms* | ~234ms | WebOS 3.0 Emulator |
81+
| Memory Footprint | ** | ** | ** |
82+
83+
* This result will change a lot with `[email protected]`.
84+
85+
** Homework.
86+
87+
Disclamer: Speed performance will compensate the memory loss. Having a sufficient amount of memory for all of your machines is important to achieving good performance. React-TV renderer focus on Memory usage, but if you want to Perfomance you can still use `react-dom` for renderer and `react-tv-cli` for builds.
88+
89+
The good sides of React-TV, in a next release, is that will be using native TVs APIs, support for React.CanvasComponents, keys mapping[...]
8190

8291
## Getting Started
8392

Diff for: examples/benchmark/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.log
3+
4+
react-tv
5+
node_modules
6+
bundle.js

Diff for: examples/benchmark/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"dependencies": {
1919
"react": "^16.0.0",
2020
"react-dom": "^16.0.0",
21-
"react-tv": "0.2.3"
21+
"react-tv": "0.3.0-alpha.1"
2222
},
2323
"devDependencies": {
2424
"babel-core": "^6.4.5",

Diff for: examples/clock-app-with-react-tv/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.log
3+
4+
react-tv
5+
node_modules
6+
bundle.js

Diff for: examples/clock-app-with-react-tv/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"react": "^16.0.0",
20-
"react-tv": "0.2.3"
20+
"react-tv": "0.3.0-alpha.1"
2121
},
2222
"devDependencies": {
2323
"babel-core": "^6.4.5",

Diff for: examples/keyboard-navigation/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.log
3+
4+
react-tv
5+
node_modules
6+
bundle.js

Diff for: examples/keyboard-navigation/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"react": "^16.0.0",
20-
"react-tv": "0.2.3"
20+
"react-tv": "0.3.0-alpha.1"
2121
},
2222
"devDependencies": {
2323
"babel-core": "^6.4.5",

Diff for: package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tv",
3-
"version": "0.2.3",
3+
"version": "0.3.0-alpha.1",
44
"description": "React Renderer for low memory applications and Packager for TVs (WebOS, Tizen, Orsay)",
55
"main": "dist/react-tv.umd.js",
66
"bin": {
@@ -16,7 +16,8 @@
1616
"build": "node scripts/rollup/build.js",
1717
"build-all": "NODE_ENV=PROD node scripts/rollup/build.js",
1818
"prepublishOnly": "yarn test && yarn build-all",
19-
"test": "node ./scripts/prettier/index && yarn flow && yarn jest",
19+
"prettier-stat": "node ./scripts/prettier/index",
20+
"test": "yarn prettier-stat && yarn flow && yarn jest",
2021
"jest": "jest",
2122
"jest-watch": "jest --watch",
2223
"flow": "flow",

Diff for: scripts/rollup/build.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,25 @@ function createBundle({entryPath, bundleType, destName}) {
3030

3131
let plugins = [
3232
flow(),
33+
replace(stripEnvVariables()),
3334
babel({
3435
babelrc: false,
3536
exclude: 'node_modules/**',
3637
externalHelpers: true,
3738
presets: [['env', {modules: false}], 'react', 'stage-2'],
3839
plugins: ['transform-flow-strip-types', 'external-helpers'],
3940
}),
40-
];
41-
42-
if (bundleType.indexOf('PROD') >= 0)
43-
plugins = plugins.concat([
44-
uglify(),
45-
optimizeJs(),
46-
replace(stripEnvVariables()),
47-
]);
48-
49-
plugins = plugins.concat([
5041
commonjs(),
5142
resolve({
5243
jsnext: true,
5344
main: true,
5445
browser: true,
5546
}),
56-
]);
47+
];
48+
49+
if (bundleType.indexOf('PROD') >= 0) {
50+
plugins = plugins.concat([optimizeJs(), uglify()]);
51+
}
5752

5853
rollup({
5954
input: entryPath,

Diff for: src/renderer/__tests__/ReactTVFiberEntry-test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ describe('[render] Behavior tests', () => {
7373
it('should componentDidMount be called', () => {
7474
class Clock extends React.Component {
7575
constructor() {
76-
super()
77-
this.state = { value: 'my first value' }
76+
super();
77+
this.state = {value: 'my first value'};
7878
}
7979

8080
componentDidMount() {
81-
this.setState({value: 'my second value'})
81+
this.setState({value: 'my second value'});
8282
}
8383

8484
render() {
8585
return (
86-
<div class='container'>
86+
<div class="container">
8787
<p>{this.state.value}</p>
8888
</div>
89-
)
89+
);
9090
}
9191
}
9292

9393
const root = document.createElement('div');
94-
render(<Clock/>, root);
94+
render(<Clock />, root);
9595
expect(root.textContent).toEqual('my second value');
9696
});
9797
});

0 commit comments

Comments
 (0)