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

Commit

Permalink
release: react-tv 0.3.0-beta.0
Browse files Browse the repository at this point in the history
- stable CLI react-tv init
- fixes on react-tv run-webos
- on process.end remove/cleanup files
- on virtualbox call remove/cleanup files
  • Loading branch information
raphamorim committed Nov 18, 2017
1 parent de82ad5 commit 8074d3b
Show file tree
Hide file tree
Showing 15 changed files with 94 additions and 51 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.3.0-beta.0

- stable CLI react-tv init
- fixes on react-tv run-webos
- on process.end remove/cleanup files
- on virtualbox call remove/cleanup files

# 0.3.0-alpha.2

- CLI: `react-tv init`
Expand Down
8 changes: 8 additions & 0 deletions cli/__tests__/init-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ describe('[CLI] init', () => {
'package.json'
));

const appInfo = require(path.resolve(
createdAppPath,
'react-tv/webos/appinfo.json'
));

expect(appInfo.id).toEqual('react.tv.app');
expect(appInfo.title).toEqual('russell-crowe');

expect(subject).toRunSuccessfully();
expect(createdPackageJson.name).toEqual('russell-crowe');
});
Expand Down
5 changes: 5 additions & 0 deletions cli/bootstrap/custom-app/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets":[
"env", "react"
]
}
2 changes: 1 addition & 1 deletion cli/bootstrap/custom-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"react": "^16.0.0",
"react-tv": "0.3.0-alpha.3"
"react-tv": "0.3.0-beta.0"
},
"devDependencies": {
"webpack": "^3.8.1",
Expand Down
25 changes: 10 additions & 15 deletions cli/bootstrap/custom-app/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,29 @@ const sourcePath = path.join(__dirname, 'src');
module.exports = {
entry: path.resolve(sourcePath, 'App.js'),
output: {
path: __dirname,
filename: 'bundle.js'
path: __dirname,
filename: 'bundle.js',
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [
sourcePath,
path.resolve(__dirname, 'node_modules')
]
modules: [sourcePath, path.resolve(__dirname, 'node_modules')],
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
'babel-loader'
],
include: sourcePath
}
]
use: ['babel-loader'],
include: sourcePath,
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
'process.env.NODE_ENV': JSON.stringify('production'),
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new UglifyJsPlugin(),
new webpack.HashedModuleIdsPlugin(),
]
}
],
};
6 changes: 2 additions & 4 deletions cli/scripts/webos/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,13 @@ function runWebOS(root) {
execSync(`rm -f ${webosPath}/icon-large.png`);
ReactTVConfig.files.forEach(file => {
execSync(`rm -f ${webosPath}/${file}`);
})
});
}

try {
cleanup();
execSync(`cp ${root}/react-tv/icon.png ${webosPath}/icon.png`);
execSync(
`cp ${root}/react-tv/icon-large.png ${webosPath}/icon-large.png`
);
execSync(`cp ${root}/react-tv/icon-large.png ${webosPath}/icon-large.png`);

ReactTVConfig.files.forEach(file => {
const filePath = path.resolve(root, file);
Expand Down
1 change: 1 addition & 0 deletions cli/shared/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function createReactTVApp(appName) {
appPath = `${appPath}/${appName}`;
try {
fs.copySync(customApp, path.resolve(appPath));
fs.copySync(appTemplatePath, path.resolve(appPath, 'react-tv'));
replace({
regex: '{{REACTTVAPP}}',
replacement: appName,
Expand Down
5 changes: 5 additions & 0 deletions examples/clock-app-with-react-tv/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets":[
"env", "react"
]
}
2 changes: 1 addition & 1 deletion examples/clock-app-with-react-tv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-tv": "0.3.0-alpha.2"
"react-tv": "0.3.0-beta.0"
},
"devDependencies": {
"webpack": "^3.8.1",
Expand Down
5 changes: 5 additions & 0 deletions examples/keyboard-navigation/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets":[
"env", "react"
]
}
13 changes: 7 additions & 6 deletions examples/keyboard-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
},
"dependencies": {
"react": "^16.0.0",
"react-tv": "0.3.0-alpha.2"
"react-tv": "0.3.0-beta.0"
},
"devDependencies": {
"babel-core": "^6.4.5",
"babel-loader": "^6.2.1",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.9.4",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.3.13",
"webpack": "^1.12.12",
"webpack-dev-server": "^1.12.1"
"babel-preset-react": "^6.24.1",
"uglifyjs-webpack-plugin": "^1.0.1"
}
}
40 changes: 40 additions & 0 deletions examples/keyboard-navigation/webpack.config.babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const path = require('path');
const webpack = require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

const sourcePath = path.join(__dirname, 'src');

module.exports = {
entry: path.resolve(sourcePath, 'Keyboard.js'),
output: {
path: __dirname,
filename: 'bundle.js'
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [
sourcePath,
path.resolve(__dirname, 'node_modules')
]
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
'babel-loader'
],
include: sourcePath
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new UglifyJsPlugin(),
new webpack.HashedModuleIdsPlugin(),
]
}
22 changes: 0 additions & 22 deletions examples/keyboard-navigation/webpack.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-tv",
"version": "0.3.0-alpha.2",
"version": "0.3.0-beta.0",
"description": "React renderer for low memory applications and Packager for TVs (WebOS, Tizen, Orsay)",
"main": "dist/react-tv.umd.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/prettier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Object.keys(config).forEach(key => {
` This project uses prettier to format all JavaScript code.\n`
) +
chalk.dim(` Please run `) +
chalk.reset('yarn prettier-all') +
chalk.reset('yarn prettier:all') +
chalk.dim(` and add changes to files listed below to your commit:`) +
`\n\n` +
e.stdout
Expand Down

0 comments on commit 8074d3b

Please sign in to comment.