Skip to content

Commit 0b7dd5e

Browse files
Merge pull request #85 from team-reactype/development
Development
2 parents 2e77474 + e0ff112 commit 0b7dd5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1955
-1118
lines changed

electron-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ directories:
22
output: dist
33
buildResources: build
44
appId: reactype
5-
copyright: Copyright © 2019
5+
copyright: Copyright © 2018
66
linux:
77
target:
88
- AppImage
@@ -20,7 +20,7 @@ win:
2020
files:
2121
- main.js
2222
- build
23-
productName: reactype
23+
productName: ReacType
2424
dmg:
2525
contents:
2626
- x: 110

index.js

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

main.js

Lines changed: 82 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
const {
2-
app,
3-
BrowserWindow,
4-
Menu,
5-
shell,
6-
dialog,
7-
ipcMain,
2+
app, BrowserWindow, Menu, shell, dialog, ipcMain,
83
} = require('electron');
94

10-
5+
// Uncomment below for hot reloading during development
116
require('electron-reload')(__dirname);
127

138
// const isDev = true;
@@ -22,9 +17,12 @@ function openFile() {
2217
// Opens file dialog looking for markdown
2318
const files = dialog.showOpenDialog(mainWindow, {
2419
properties: ['openFile'],
25-
filters: [{
26-
name: 'Images', extensions: ['jpeg', 'jpg', 'png', 'gif', 'pdf'],
27-
}],
20+
filters: [
21+
{
22+
name: 'Images',
23+
extensions: ['jpeg', 'jpg', 'png', 'gif', 'pdf'],
24+
},
25+
],
2826
});
2927

3028
// if no files
@@ -77,77 +75,73 @@ const createWindow = () => {
7775
mainWindow.show();
7876
});
7977

80-
const template = [{
81-
label: 'File',
82-
submenu: [{
83-
label: 'Open File',
84-
accelerator: process.platform === 'darwin' ? 'Cmd+O' : 'Ctrl+Shift+O',
85-
click() {
86-
openFile();
87-
},
78+
const template = [
79+
{
80+
label: 'File',
81+
submenu: [
82+
{
83+
label: 'Open File',
84+
accelerator: process.platform === 'darwin' ? 'Cmd+O' : 'Ctrl+Shift+O',
85+
click() {
86+
openFile();
87+
},
88+
},
89+
],
8890
},
91+
// {
92+
// label: 'Edit',
93+
// submenu: [
94+
// { role: 'undo' },
95+
// { role: 'redo' },
96+
// { type: 'separator' },
97+
// { role: 'cut' },
98+
// { role: 'copy' },
99+
// { role: 'paste' },
100+
// { role: 'pasteandmatchstyle' },
101+
// { role: 'delete' },
102+
// { role: 'selectall' },
103+
// ],
104+
// },
89105
{
90-
label: 'Export Components',
91-
accelerator: process.platform === 'darwin' ? 'Cmd+E' : 'Ctrl+Shift+E',
92-
click() {
93-
exportComponents();
94-
},
95-
}],
96-
},
97-
{
98-
label: 'Edit',
99-
submenu: [
100-
{ role: 'undo' },
101-
{ role: 'redo' },
102-
{ type: 'separator' },
103-
{ role: 'cut' },
104-
{ role: 'copy' },
105-
{ role: 'paste' },
106-
{ role: 'pasteandmatchstyle' },
107-
{ role: 'delete' },
108-
{ role: 'selectall' },
109-
],
110-
},
111-
{
112-
label: 'View',
113-
submenu: [
114-
{ role: 'reload' },
115-
{ role: 'forcereload' },
116-
{ role: 'toggledevtools' },
117-
{ type: 'separator' },
118-
{ role: 'resetzoom' },
119-
{ role: 'zoomin' },
120-
{ role: 'zoomout' },
121-
{ type: 'separator' },
122-
{ role: 'togglefullscreen' },
123-
],
124-
},
125-
{
126-
role: 'window',
127-
submenu: [
128-
{ role: 'minimize' },
129-
{ role: 'close' },
130-
],
131-
},
132-
{
133-
role: 'help',
134-
submenu: [{
135-
label: 'Learn More',
136-
click() {
137-
shell.openExternal('https://electronjs.org');
138-
},
139-
}],
140-
},
141-
{
142-
label: 'Developer',
143-
submenu: [{
144-
label: 'Toggle Developer Tools',
145-
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
146-
click() {
147-
mainWindow.webContents.toggleDevTools();
148-
},
149-
}],
150-
},
106+
label: 'View',
107+
submenu: [
108+
{ role: 'reload' },
109+
{ role: 'forcereload' },
110+
{ type: 'separator' },
111+
{ role: 'resetzoom' },
112+
{ role: 'zoomin' },
113+
{ role: 'zoomout' },
114+
{ type: 'separator' },
115+
{ role: 'togglefullscreen' },
116+
],
117+
},
118+
{
119+
role: 'window',
120+
submenu: [{ role: 'minimize' }, { role: 'close' }],
121+
},
122+
{
123+
role: 'help',
124+
submenu: [
125+
{
126+
label: 'Learn More',
127+
click() {
128+
shell.openExternal('https://electronjs.org');
129+
},
130+
},
131+
],
132+
},
133+
{
134+
label: 'Developer',
135+
submenu: [
136+
{
137+
label: 'Toggle Developer Tools',
138+
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
139+
click() {
140+
mainWindow.webContents.toggleDevTools();
141+
},
142+
},
143+
],
144+
},
151145
];
152146

153147
if (process.platform === 'darwin') {
@@ -167,12 +161,15 @@ const createWindow = () => {
167161
});
168162

169163
// Edit menu
170-
template[2].submenu.push({
171-
type: 'separator',
172-
}, {
173-
label: 'Speech',
174-
submenu: [{ role: 'startspeaking' }, { role: 'stopspeaking' }],
175-
});
164+
template[2].submenu.push(
165+
{
166+
type: 'separator',
167+
},
168+
{
169+
label: 'Speech',
170+
submenu: [{ role: 'startspeaking' }, { role: 'stopspeaking' }],
171+
},
172+
);
176173

177174
// Window menu
178175
template[4].submenu = [

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
2-
"name": "teamreactype",
2+
"name": "reactype",
33
"version": "1.0.0",
44
"description": "Prototyping tool for React/Typescript Applications.",
55
"main": "main.js",
6+
"contributors": [
7+
"Christian Padilla",
8+
"Tolga Mizrakci",
9+
"Shlomo Porges",
10+
"Adam Singer"
11+
],
612
"repository": {
713
"type": "git",
8-
"url": ""
14+
"url": "https://github.com/team-reactype/ReacType"
915
},
1016
"build": {
11-
"appId": "",
17+
"appId": "com.team-reactype.reactype",
1218
"copyright": "Copyright © 2018",
1319
"linux": {
1420
"target": [
1521
"AppImage",
1622
"deb"
1723
],
18-
"maintainer": "blessingebowe@gmail.com"
24+
"maintainer": "spincycle01@yahoo.com"
1925
},
2026
"mac": {
2127
"category": "public.app-category.developer-tools",
@@ -63,7 +69,6 @@
6369
"reactype": "./index.js"
6470
},
6571
"preferGlobal": true,
66-
"contributors": [],
6772
"license": "MIT",
6873
"jest": {
6974
"moduleNameMapper": {
@@ -86,9 +91,8 @@
8691
"cli-spinner": "^0.2.8",
8792
"commander": "^2.17.1",
8893
"d3": "^5.9.2",
89-
"electron": "^2.0.7",
90-
"electron-reload": "^1.4.0",
9194
"enzyme": "^3.4.1",
95+
"electron-reload": "^1.4.0",
9296
"konva": "^2.1.7",
9397
"localforage": "^1.7.2",
9498
"lodash.throttle": "^4.1.1",

src/actions/components.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ export const openExpansionPanel = component => ({
240240
payload: { component },
241241
});
242242

243-
// export const deleteAllData = () => ({
244-
// type: DELETE_ALL_DATA,
245-
// });
243+
export const deleteAllData = () => ({
244+
type: DELETE_ALL_DATA,
245+
});
246246

247247
export const deleteProp = propId => dispatch => {
248248
dispatch({ type: DELETE_PROP, payload: propId });

src/components/App.tsx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
import React, { Component } from 'react';
22
import '../public/styles/style.css';
3-
import { MuiThemeProvider } from '@material-ui/core/styles';
4-
import theme from './theme.ts';
5-
import AppContainer from '../containers/AppContainer.tsx';
3+
// import { MuiThemeProvider } from '@material-ui/core/styles';
4+
import AppContainer from '../containers/AppContainer';
65

7-
class App extends Component {
8-
render() {
9-
return (
10-
<MuiThemeProvider theme={theme}>
11-
<div className="app">
12-
<div>
13-
<header style={{ height: '40px', width: '100%' }}>ReacType</header>
14-
<AppContainer />
15-
</div>
16-
</div>
17-
</MuiThemeProvider>
18-
);
19-
}
20-
}
6+
export const App: React.SFC = () => (
7+
<div className="app">
8+
<div>
9+
<header style={{ height: '40px', width: '100%' }}>ReacType</header>
10+
<AppContainer />
11+
</div>
12+
</div>
13+
);
2114

2215
export default App;
16+

0 commit comments

Comments
 (0)