Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"presets": ["env", "react", "stage-0"]
"presets": ["env", "react", "stage-0"],
"plugins": ["dynamic-import-node"]
}
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
ReactNative
===

This is a GUI for running React Native commands. It is built with electron so it works on Linux, Mac and Windows.
GUI client for React Native. It is built with electron so it works on Linux, Mac and Windows.

# Downloads

[v0.1.1](http://v1.1.1) is out! Choose your weapon.
v0.1.2 is out! Choose your weapon.


[<img alt="Mac" src="http://clinsite.com/wp-content/uploads/2017/01/Apple-logo-120x120.png" />](https://drive.google.com/open?id=12GdTnRph5DMrAj5b8Kmntykm0lXbOcT-)
[<img alt="Windows" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Windows_logo_-_2012_derivative.svg/120px-Windows_logo_-_2012_derivative.svg.png" />](http://google.es)
[<img alt="Linux" src="http://www.linuxscrew.com/wp-content/uploads/2007/11/120px-crystal_128_penguin.png" />](https://drive.google.com/open?id=1F5Luv13r9QkX8MDCqUN1NtyPN3FFHKaQ)
[<img alt="Mac" src="http://clinsite.com/wp-content/uploads/2017/01/Apple-logo-120x120.png" />](https://drive.google.com/open?id=10mNTPIkciCO3VkkUY_HjCLORsRZDc3lJ)
[<img alt="Windows" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Windows_logo_-_2012_derivative.svg/120px-Windows_logo_-_2012_derivative.svg.png" />](https://drive.google.com/open?id=120US9Yz6VownTAS6x2Ts_im6HdK4xO8H)
[<img alt="Linux" src="http://www.linuxscrew.com/wp-content/uploads/2007/11/120px-crystal_128_penguin.png" />](https://drive.google.com/open?id=1-uZPb7VMFt0K8A9-P9ybmYRReLNZY-g2)

# Screenshots

## Home screen

![Home](https://raw.githubusercontent.com/co2-git/ReactNative/master/assets/screenshots/v0.1.1/Home.png)
![Home](https://raw.githubusercontent.com/co2-git/ReactNative/master/assets/screenshots/v0.1.2/Home.png)

## Init app

Expand All @@ -27,3 +27,15 @@ This is a GUI for running React Native commands. It is built with electron so it
### Interactive terminal

![Init app terminal](https://raw.githubusercontent.com/co2-git/ReactNative/master/assets/screenshots/v0.1.1/Init_App_Terminal.png)

# License

The MIT License (MIT)

Copyright (c) 2018 Francois V (https://francoisv.herokuapp.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 changes: 11 additions & 1 deletion app/components/Layout/AppCard.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// @flow
import React, {PureComponent} from 'react';
import {Card, CardHeader} from 'material-ui/Card';
import {Card, CardHeader, CardActions} from 'material-ui/Card';
import path from 'path';
import RaisedButton from 'material-ui/RaisedButton';
import CloseIcon from 'material-ui/svg-icons/navigation/close';

import Animated from '../Base/Animated';
import {closeApp} from '../../redux/actions/appsActions';

type $AppCardOwnProps = {
app: $App,
Expand All @@ -28,6 +31,13 @@ class AppCard extends PureComponent<$AppCardProps> {
actAsExpander
showExpandableButton={false}
/>
<CardActions>
<RaisedButton
label="Remove app from list"
icon={<CloseIcon style={{marginTop: -4}} />}
onClick={() => closeApp(this.props.app)}
/>
</CardActions>
</Card>
</Animated>
);
Expand Down
41 changes: 11 additions & 30 deletions app/redux/actions/appsActions.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// eslint-disable-next-line import/no-unresolved, import/extensions
import {remote} from 'electron';
import first from 'lodash/first';
import find from 'lodash/find';

import store from '../store';
import * as types from '../types';
import {read, stat} from '../../helpers/fsHelpers';

export const openApp = async (appPath, cb) => {
try {
Expand All @@ -13,7 +13,7 @@ export const openApp = async (appPath, cb) => {
path = appPath;
} else {
const directories = await remote.dialog.showOpenDialog({
properties: ['openDirectory']
properties: ['openDirectory'],
});
if (directories) {
path = first(directories);
Expand All @@ -29,24 +29,22 @@ export const openApp = async (appPath, cb) => {
}
});
}
store.dispatch({type: types.OPEN_APP, payload: {path}});
store.dispatch({type: types.SELECT_APP, payload: {path}});
try {
const stats = await stat(`${path}/package.json`);
store.dispatch({type: types.APP_HAS_PACKAGE, payload: {path, hasPackage: true}});
const info = await import(`${path}/package.json`);
store.dispatch({type: types.OPEN_APP, payload: {path, info}});
} catch (error) {
if (error.code === 'ENOENT') {
store.dispatch({type: types.APP_HAS_PACKAGE, payload: {path, hasPackage: false}});
} else {
throw error;
}
store.dispatch({
type: types.ERROR,
payload: {
error: new Error(`${path} is not a React Native app`),
},
});
}
}
} catch (error) {
console.log(error.stack);
store.dispatch({type: types.ERROR, payload: {error}});
}
}
};

export const closeApp = async (app) => {
try {
Expand All @@ -55,20 +53,3 @@ export const closeApp = async (app) => {
store.dispatch({type: types.ERROR, payload: {error}});
}
};

export const openBase = async () => {
try {
let path;
const directories = await remote.dialog.showOpenDialog({
properties: ['openDirectory']
});
if (directories) {
path = first(directories);
}
if (path) {
}
} catch (error) {
console.log(error.stack);
store.dispatch({type: types.ERROR, payload: {error}});
}
};
Binary file added assets/icons/icon.ico
Binary file not shown.
Binary file added assets/screenshots/v0.1.2/Home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"name": "ReactNative",
"version": "0.1.1",
"version": "0.1.2",
"scripts": {
"start": "electron main.js",
"babel": "babel --out-dir dist/ app/",
"build": "bash scripts/build.sh $npm_package_name $npm_package_version",
"build:osx": "yarn build darwin",
"build:linux": "yarn build linux",
"build:windows": "yarn build win32"
"build:windows": "yarn build win32",
"build:all": "npm-run-parallel build:osx build:linux build:windows"
},
"dependencies": {
"babel-polyfill": "^6.26.0",
"chokidar": "^2.0.3",
"fix-path": "^2.1.0",
"lodash": "^4.17.5",
"material-ui": "^0.20.0",
Expand All @@ -27,6 +29,8 @@
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.2",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-flow": "^6.18.0",
"babel-preset-electron": "^1.4.15",
"babel-preset-env": "^1.6.1",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
APP_NAME="$1"
APP_VERSION="$2"
PLATFORM=${3:-all}
ELECTRON_VERSION=1.7.0
ELECTRON_VERSION=1.8.4

electron-packager . $APP_NAME \
--electron-version=$ELECTRON_VERSION \
--platform=$PLATFORM \
--version=$ELECTRON_VERSION \
--icon=assets/icons/icon \
--out=release/$APP_VERSION \
--ignore=release
--ignore=release \
--ignore=assets/screenshots
Loading