Skip to content

Commit 873c79a

Browse files
authored
Merge pull request #5 from Wolox/empty-project
Create two type of bootstrap (empty - complete)
2 parents ed66516 + 1f4bc35 commit 873c79a

File tree

18 files changed

+180
-616
lines changed

18 files changed

+180
-616
lines changed

generators/app/index.js

Lines changed: 142 additions & 270 deletions
Large diffs are not rendered by default.

generators/app/templates/_package.json

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,19 @@
88
"url": "<%= repoUrl %>"
99
},
1010
"dependencies": {
11-
<% if (includeRadium) {%>
12-
"radium": "^0.19.4",<%
13-
}
14-
15-
if (includeMobileDetect) {%>
16-
"mobile-detect": "^1.3.7",<%
17-
}
18-
19-
if (includeMoment) {%>
20-
"moment": "^2.18.1",<%
21-
}
22-
23-
if (includeNukaCarousel) {%>
24-
"nuka-carousel": "^2.3.0",<%
25-
}
26-
27-
if (includeNumeral) {%>
28-
"numeral": "^2.0.6",<%
29-
}
30-
31-
if (includeReactAlert) {%>
32-
"react-alert": "^2.3.0",<%
33-
}
34-
35-
if (includeReactModal) {%>
36-
"react-modal": "^2.3.2",<%
37-
}
38-
39-
if (includeReactResponsive) {%>
40-
"react-responsive": "^1.3.4",<%
41-
}
42-
43-
if (includeReactScroll) {%>
44-
"react-scroll": "^1.5.4",<%
45-
}
46-
47-
if (includeReactShare) {%>
48-
"react-share": "^1.16.0",<%
49-
}
50-
51-
if (includeReactVirtualized) {%>
52-
"react-virtualized": "^9.9.0",<%
53-
}
54-
55-
if (includeRecharts) {%>
56-
"recharts": "^1.0.0-alpha.4",<%
57-
}
58-
59-
if (includeReactGoogleMaps) {%>
11+
<% if (includeAll) {%>
12+
"radium": "^0.19.4",
13+
"mobile-detect": "^1.3.7",
14+
"moment": "^2.18.1",
15+
"nuka-carousel": "^2.3.0",
16+
"numeral": "^2.0.6",
17+
"react-alert": "^2.3.0",
18+
"react-modal": "^2.3.2",
19+
"react-responsive": "^1.3.4",
20+
"react-scroll": "^1.5.4",
21+
"react-share": "^1.16.0",
22+
"react-virtualized": "^9.9.0",
23+
"recharts": "^1.0.0-alpha.4",
6024
"react-google-maps": "^7.3.0",<%
6125
}%>
6226
"reselect": "^3.0.1",
@@ -67,7 +31,6 @@
6731
"postcss": "^6.0.11",
6832
"prop-types": "^15.5.10",
6933
"react": "^15.6.1",
70-
"react-addons-perf": "^15.4.2",
7134
"react-dom": "^15.6.1",
7235
"react-redux": "^5.0.6",
7336
"react-router": "^4.2.0",

generators/app/templates/src/app/components/Routes/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { ConnectedRouter } from "react-router-redux";
33
import { Switch } from "react-router-dom";
44

55
import { history } from "../../../redux/store";
6-
import Home from "../../screens/Dashboard/screens/Home";
7-
import Login from "../../screens/Login";
6+
import Home from "../../screens/Dashboard";
87

98
import AuthenticatedRoute from "./components/AuthenticatedRoute";
109
import * as Routes from "./constants";
@@ -21,12 +20,6 @@ function AppRoutes() {
2120
path={Routes.HOME}
2221
component={Home}
2322
/>
24-
<AuthenticatedRoute
25-
isPublicRoute
26-
exact
27-
path={Routes.LOGIN}
28-
component={Login}
29-
/>
3023
</Switch>
3124
</div>
3225
</ConnectedRouter>

generators/app/templates/src/app/index.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
import React, { Component } from "react";
2-
import { connect } from "react-redux";
3-
import { StyleRoot } from "radium";
1+
import React, { Component } from 'react';
2+
import { connect } from 'react-redux';
43

5-
import { apiSetup } from "../config/api";
4+
import { apiSetup } from '../config/api';
65

7-
import Routes from "./components/Routes";
6+
import Routes from './components/Routes';
87

98
class App extends Component {
109
componentDidMount() {
1110
apiSetup(this.props.dispatch);
1211
}
1312

1413
render() {
15-
return (
16-
<StyleRoot>
17-
<Routes />
18-
</StyleRoot>
19-
);
14+
return <Routes />;
2015
}
2116
}
2217

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,22 @@
1-
import React from "react";
2-
import { connect } from "react-redux";
3-
import Radium from "radium";
4-
import { Route, Switch, Redirect } from "react-router-dom";
5-
import PropTypes from "prop-types";
1+
import React from 'react';
2+
import { connect } from 'react-redux';
3+
import { Route, Switch, Redirect } from 'react-router-dom';
64

7-
import * as Routes from "../../components/Routes/constants";
5+
import * as Routes from '../../components/Routes/constants';
86

9-
import Home from "./screens/Home";
10-
import Login from "../Login";
7+
import Home from './screens/Home';
118

12-
import styles from "./styles";
13-
14-
function Dashboard({ loading }) {
9+
function Dashboard() {
1510
return (
16-
<div style={styles.base}>
17-
<div style={styles.baseContent}>
18-
{/* <Topbar />
19-
<Sidebar /> */}
20-
<div style={styles.content}>
21-
<Switch>
22-
<Route exact path={Routes.HOME} component={Home} />
23-
<Route exact path={Routes.LOGIN} component={Login} />
24-
<Route render={() => <Redirect to={Routes.HOME} />} />
25-
</Switch>
26-
</div>
27-
</div>
28-
</div>
11+
<Switch>
12+
<Route exact path={Routes.HOME} component={Home} />
13+
<Route render={() => <Redirect to={Routes.HOME} />} />
14+
</Switch>
2915
);
3016
}
3117

3218
Dashboard.defaultProps = {
3319
loading: false
3420
};
3521

36-
Dashboard.propTypes = {
37-
loading: PropTypes.bool.isRequired
38-
};
39-
40-
export default connect()(Radium(Dashboard));
22+
export default connect()(Dashboard);
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
import React, { Component } from "react";
2-
import { connect } from "react-redux";
1+
import React from "react";
32

4-
import { actionCreators as authActions } from "../../../../../redux/Auth/actions";
5-
import Home from "./layout";
6-
7-
class HomeContainer extends Component {
8-
handleLogout = () => {
9-
this.props.dispatch(authActions.logout());
10-
};
11-
12-
render() {
13-
return <Home onLogout={this.handleLogout} />;
14-
}
3+
export default function Home() {
4+
return <div />;
155
}
16-
17-
export default connect()(HomeContainer);

generators/app/templates/src/app/screens/Dashboard/screens/Home/layout.js

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

generators/app/templates/src/app/screens/Dashboard/screens/Home/styles.js

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

generators/app/templates/src/app/screens/Dashboard/styles.js

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

generators/app/templates/src/app/screens/Login/index.js

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

0 commit comments

Comments
 (0)