Skip to content

Commit c0a7fe0

Browse files
authored
Merge pull request react-toolbox#41 from olegstepura/master
[email protected], [email protected] and [email protected]
2 parents 025e409 + f5e7720 commit c0a7fe0

17 files changed

+162
-554
lines changed

.sass-lint.yml

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

package.json

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-toolbox-example",
33
"description": "A set of complementary tools to ReactJS.",
4-
"version": "0.11.4",
4+
"version": "0.12.0",
55
"author": {
66
"name": "React Toolbox Team",
77
"url": "http://github.com/react-toolbox"
@@ -16,6 +16,11 @@
1616
"name": "Javi Velasco Arjona",
1717
"email": "[email protected]",
1818
"url": "http://javivelasco.com/"
19+
},
20+
{
21+
"name": "Oleg Stepura",
22+
"email": "oleg[at]stepura.com",
23+
"url": "http://oleg.stepura.com/"
1924
}
2025
],
2126
"repository": {
@@ -33,46 +38,45 @@
3338
"react-component",
3439
"toolbox"
3540
],
41+
"engines": {
42+
"node": ">=4.3.0",
43+
"npm": ">=4.0.1"
44+
},
45+
"dependencies": {
46+
"react": "^15.4.2",
47+
"react-dom": "^15.4.2",
48+
"react-toolbox": "^2.0.0-beta.5",
49+
"react-addons-css-transition-group": "^15.4.2"
50+
},
3651
"devDependencies": {
37-
"autoprefixer": "~6.4.0",
38-
"babel-core": "~6.13.2",
39-
"babel-eslint": "~6.0.4",
40-
"babel-loader": "~6.0.1",
41-
"babel-plugin-react-transform": "~2.0.2",
42-
"babel-preset-es2015": "~6.1.4",
43-
"babel-preset-react": "~6.1.4",
44-
"babel-preset-stage-0": "~6.5.0",
45-
"classnames": "~2.2.1",
46-
"cross-env": "~2.0.0",
47-
"css-loader": "~0.23.1",
48-
"eslint": "~3.3.1",
49-
"eslint-plugin-babel": "~3.2.0",
50-
"eslint-plugin-react": "~6.1.2",
51-
"express": "~4.13.3",
52-
"extract-text-webpack-plugin": "~1.0.1",
53-
"internal-ip": "~1.2.0",
54-
"node-sass": "~3.8.0",
55-
"normalize.css": "~4.2.0",
56-
"postcss-loader": "~0.10.1",
57-
"react": "~15.3.0",
58-
"react-addons-css-transition-group": "~15.3.0",
59-
"react-addons-update": "~15.3.0",
60-
"react-dom": "~15.3.0",
61-
"react-toolbox": "~1.1.2",
62-
"react-transform-catch-errors": "~1.0.0",
63-
"react-transform-hmr": "~1.0.1",
64-
"redbox-react": "~1.3.0",
65-
"sass-lint": "~1.7.0",
66-
"sass-loader": "~4.0.0",
67-
"style-loader": "~0.13.1",
68-
"webpack": "~1.13.2",
69-
"webpack-dev-middleware": "~1.6.1",
70-
"webpack-hot-middleware": "~2.12.2"
52+
"autoprefixer": "^6.6.1",
53+
"babel-core": "^6.21.0",
54+
"babel-eslint": "~7.1.1",
55+
"babel-loader": "^6.2.10",
56+
"babel-plugin-transform-node-env-inline": "^6.8.0",
57+
"babel-preset-es2015": "^6.18.0",
58+
"babel-preset-react": "^6.16.0",
59+
"babel-preset-stage-2": "^6.18.0",
60+
"cross-env": "^3.1.4",
61+
"css-loader": "^0.26.1",
62+
"eslint": "~3.14.0",
63+
"eslint-plugin-babel": "~4.0.1",
64+
"eslint-plugin-react": "^6.9.0",
65+
"postcss-cssnext": "^2.9.0",
66+
"postcss-each": "^0.9.3",
67+
"postcss-import": "^9.1.0",
68+
"postcss-loader": "^1.2.2",
69+
"postcss-mixins": "^5.4.1",
70+
"react-hot-loader": "^3.0.0-beta.6",
71+
"redux-devtools-extension": "^1.0.0",
72+
"style-loader": "^0.13.1",
73+
"webpack": "^2.2.0",
74+
"webpack-dev-server": "^2.2.0"
7175
},
7276
"scripts": {
73-
"build": "cross-env NODE_ENV=production UV_THREADPOOL_SIZE=100 webpack --config webpack.config",
74-
"deploy": "gh-pages -d build",
75-
"start": "node server"
77+
"start": "node_modules/.bin/cross-env NODE_ENV=development node_modules/.bin/webpack-dev-server --colors --config webpack.config.js",
78+
"build": "node_modules/.bin/cross-env NODE_ENV=production UV_THREADPOOL_SIZE=100 webpack --config webpack.config.js",
79+
"deploy": "gh-pages -d build"
7680
},
7781
"license": "MIT",
7882
"homepage": "https://github.com/react-toolbox/react-toolbox-example#readme"

postcss.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
plugins: {
3+
'postcss-import': {
4+
root: __dirname,
5+
},
6+
'postcss-mixins': {},
7+
'postcss-each': {},
8+
'postcss-cssnext': {}
9+
},
10+
};

server.js

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

src/app/PurpleAppBar.scss

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

src/app/SuccessButton.scss

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

src/app/client.js

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

src/app/theme/_config.scss

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

src/app/App.js renamed to src/frontend/component/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
// import 'react-toolbox/lib/commons.scss'; // Import common styles
32
import PurpleAppBar from './PurpleAppBar.js'; // AppBar with simple overrides
43
import SuccessButton from './SuccessButton.js'; // A button with complex overrides
54
import { Button } from 'react-toolbox/lib/button'; // Bundled component import

src/app/Logo.js renamed to src/frontend/component/Logo.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.appBar {
2+
background-color: #800080;
3+
}
4+
.appBar svg {
5+
width: 3.4rem;
6+
height: 3.4rem;
7+
margin-right: 1rem;
8+
fill: #fff;
9+
}

src/app/PurpleAppBar.js renamed to src/frontend/component/PurpleAppBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { PropTypes } from 'react';
22
import { AppBar } from 'react-toolbox/lib/app_bar';
33
import Logo from './Logo.js';
4-
import theme from './PurpleAppBar.scss';
4+
import theme from './PurpleAppBar.css';
55

66
const PurpleAppBar = ({ children, ...other }) => (
77
<AppBar {...other} theme={theme}>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import "react-toolbox/lib/button/theme.css";
2+
3+
.button {
4+
background-color: var(--palette-green-700) !important;
5+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Button } from 'react-toolbox/lib/button';
3-
import theme from './SuccessButton.scss';
3+
import theme from './SuccessButton.css';
44

55
const SuccessButton = (props) => <Button {...props} theme={theme} />;
66
export default SuccessButton;

src/frontend/index.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './component/App';
4+
import { AppContainer } from 'react-hot-loader';
5+
import { overrideComponentTypeChecker } from 'react-toolbox';
6+
7+
const rootEl = document.getElementById('app');
8+
9+
const render = () => {
10+
ReactDOM.render(
11+
<AppContainer>
12+
<App />
13+
</AppContainer>,
14+
rootEl
15+
);
16+
};
17+
18+
if (process.env.NODE_ENV !== 'production') {
19+
overrideComponentTypeChecker((classType, reactElement) => (
20+
reactElement && (
21+
reactElement.type === classType
22+
|| reactElement.type.name === classType.displayName
23+
)
24+
));
25+
if (module.hot) {
26+
module.hot.accept('./component/App', render);
27+
}
28+
}
29+
30+
render();

src/www/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
<meta http-equiv="cleartype" content="on">
1616
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
1717
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
18-
<link rel="stylesheet" href="bundle.css">
18+
<style>html, body { margin: 0; padding: 0; }</style>
1919
</head>
2020

2121
<body>
2222
<div id="app"></div>
23-
<script src="vendor.bundle.js"></script>
2423
<script src="bundle.js"></script>
2524
</body>
2625
</html>

0 commit comments

Comments
 (0)