Skip to content

Commit 59ce481

Browse files
style changes
1 parent a35ae60 commit 59ce481

File tree

7 files changed

+76
-48
lines changed

7 files changed

+76
-48
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"@material-ui/icons": "^2.0.0",
8080
"@types/react": "^16.8.14",
8181
"@types/react-dom": "^16.8.4",
82+
"@types/react-redux": "^7.0.8",
8283
"autoprefixer": "^9.0.1",
8384
"babel-polyfill": "^6.26.0",
8485
"classnames": "^2.2.6",

src/actions/components.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export const changeComponentFocusChild = ({ componentId, childId }) => (dispatch
145145
};
146146

147147
export const exportFiles = ({ components, path }) => (dispatch) => {
148+
// this dispatch sets the global state property 'loading' to true until the createFiles call resolves below
148149
dispatch({
149150
type: EXPORT_FILES,
150151
});
@@ -183,7 +184,7 @@ export const createApplication = ({
183184
path,
184185
components = [],
185186
genOption,
186-
appName = 'proto_app',
187+
appName = 'reactype_app',
187188
repoUrl,
188189
}) => (dispatch) => {
189190
if (genOption === 0) {

src/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
22
import '../public/styles/style.css';
33
import { MuiThemeProvider } from '@material-ui/core/styles';
44
import theme from './theme.ts';
5-
import AppContainer from '../containers/AppContainer.jsx';
5+
import AppContainer from '../containers/AppContainer.tsx';
66

77
class App extends Component {
88
render() {

src/components/__tests__/App.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
// import '../../setupTests';
33
import { shallow } from 'enzyme';
44
import App from '../App.tsx';
5-
import AppContainer from '../../containers/AppContainer.jsx';
5+
import AppContainer from '../../containers/AppContainer.tsx';
66

77
it('contains a AppContainer', () => {
88
// wrapped version of react component

src/containers/AppContainer.jsx renamed to src/containers/AppContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MuiThemeProvider } from '@material-ui/core/styles';
55
import LinearProgress from '@material-ui/core/LinearProgress';
66
import LeftContainer from './LeftContainer.jsx';
77
import MainContainer from './MainContainer.jsx';
8-
import RightContainer from './RightContainer.jsx';
8+
// import RightContainer from './RightContainer.jsx';
99
import convertIdsToObjs from '../utils/convertIdsToObjs.util';
1010
import theme from '../components/theme.ts';
1111
import { loadInitData } from '../actions/components';

src/utils/createApplication.util.js

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,46 @@
1010
import fs from 'fs';
1111
import { format } from 'prettier';
1212

13-
function createApplicationUtil({path, appName, genOption, repoUrl}) {
14-
if (genOption === 1) {
15-
return [
16-
function createIndexHtml() {
17-
const fileName = 'index.html';
18-
const data = `
19-
<!DOCTYPE html>
20-
<html lang="en">
21-
<head>
22-
<meta charset="UTF-8">
23-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
24-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
25-
<title>Document</title>
26-
</head>
27-
<body>
28-
<div id='root'></div>
29-
<script src='bundle.js'></script>
30-
</body>
31-
</html>
32-
`;
33-
fs.writeFile(fileName, format(data, {
34-
singleQuote: true,
35-
trailingComma: 'es5',
36-
bracketSpacing: true,
37-
jsxBracketSameLine: true,
38-
parser: 'babel',
39-
}),
40-
(err) => {
41-
if (err) {
42-
console.log('index.html error:', err.message);
43-
} else {
44-
console.log('index.html written successfully');
45-
}
46-
});
13+
function createApplicationUtil({
14+
path, appName, genOption, repoUrl,
15+
}) {
16+
function createIndexHtml() {
17+
const fileName = 'index.html';
18+
const data = `
19+
<!DOCTYPE html>
20+
<html lang="en">
21+
<head>
22+
<meta charset="UTF-8">
23+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
24+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
25+
<title>Document</title>
26+
</head>
27+
<body>
28+
<div id='root'></div>
29+
<script src='bundle.js'></script>
30+
</body>
31+
</html>
32+
`;
33+
fs.writeFile(
34+
fileName,
35+
format(data, {
36+
singleQuote: true,
37+
trailingComma: 'es5',
38+
bracketSpacing: true,
39+
jsxBracketSameLine: true,
40+
parser: 'babel',
41+
}),
42+
(err) => {
43+
if (err) {
44+
console.log('index.html error:', err.message);
45+
} else {
46+
console.log('index.html written successfully');
47+
}
4748
},
48-
];
49+
);
50+
}
51+
if (genOption === 1) {
52+
createIndexHtml();
4953
}
5054
}
5155
export default createApplicationUtil;
@@ -62,15 +66,9 @@ export default createApplicationUtil;
6266
// await execFile('touch', '.babelrc', { cwd: path }),
6367
// ];
6468
// }
65-
// return repoUrl ? execFile('git', ['clone', repoUrl, appName], { cwd: path }) : null;
69+
// return repoUrl ? execFile('git', ['clone', repoUrl, appName], { cwd: path }) : null;
6670
// }
6771

68-
69-
70-
71-
72-
73-
7472
// import util from 'util';
7573

7674
// const execFile = util.promisify(require('child_process').execFile);
@@ -80,7 +78,6 @@ export default createApplicationUtil;
8078
// 'Export into existing project.', 'Export with starter repo', 'Export with create-react-app.'
8179
// ];
8280

83-
8481
// async function createApplicationUtil({
8582
// path, appName, genOption, repoUrl,
8683
// }) {
@@ -93,4 +90,4 @@ export default createApplicationUtil;
9390
// return repoUrl ? execFile('git', ['clone', repoUrl, appName], { cwd: path }) : null;
9491
// }
9592

96-
// export default createApplicationUtil;
93+
// export default createApplicationUtil;

yarn.lock

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@
180180
"@babel/runtime" "7.0.0-beta.42"
181181
recompose "^0.28.0"
182182

183+
"@types/hoist-non-react-statics@^3.3.0":
184+
version "3.3.1"
185+
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
186+
integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==
187+
dependencies:
188+
"@types/react" "*"
189+
hoist-non-react-statics "^3.3.0"
190+
183191
"@types/invariant@^2.2.29":
184192
version "2.2.29"
185193
resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.29.tgz#aa845204cd0a289f65d47e0de63a6a815e30cc66"
@@ -216,6 +224,15 @@
216224
dependencies:
217225
"@types/react" "*"
218226

227+
"@types/react-redux@^7.0.8":
228+
version "7.0.8"
229+
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.0.8.tgz#c928863058e334d41031c6bedd0f113bc514e234"
230+
integrity sha512-vIBC15E84ehN6RzdGwRVa41whp9e4CkfPm+WfD0r6y6vqBf4tQPKZeKEBfLLM8k79uSwQC7rh3rH/MFaN1IESQ==
231+
dependencies:
232+
"@types/hoist-non-react-statics" "^3.3.0"
233+
"@types/react" "*"
234+
redux "^4.0.0"
235+
219236
"@types/react-transition-group@^2.0.8":
220237
version "2.0.13"
221238
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.0.13.tgz#7769fb61eb71d64d087a713956f086a42c3ee171"
@@ -4106,6 +4123,13 @@ hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0:
41064123
version "2.5.5"
41074124
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
41084125

4126+
hoist-non-react-statics@^3.3.0:
4127+
version "3.3.0"
4128+
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b"
4129+
integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==
4130+
dependencies:
4131+
react-is "^16.7.0"
4132+
41094133
home-or-tmp@^2.0.0:
41104134
version "2.0.0"
41114135
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
@@ -7123,6 +7147,11 @@ react-is@^16.4.2:
71237147
version "16.4.2"
71247148
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.4.2.tgz#84891b56c2b6d9efdee577cc83501dfc5ecead88"
71257149

7150+
react-is@^16.7.0:
7151+
version "16.8.6"
7152+
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
7153+
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
7154+
71267155
react-jss@^8.1.0:
71277156
version "8.6.1"
71287157
resolved "https://registry.yarnpkg.com/react-jss/-/react-jss-8.6.1.tgz#a06e2e1d2c4d91b4d11befda865e6c07fbd75252"

0 commit comments

Comments
 (0)