Skip to content

Commit

Permalink
Add ant design to the project (#2)
Browse files Browse the repository at this point in the history
- Remove the MaterialUI theme from the project
- Add ant design dependencies
- Add a card in home page to test ant setup
  • Loading branch information
gupta-utkarsh authored and deshraj committed May 11, 2017
1 parent 93a02e5 commit a28229f
Show file tree
Hide file tree
Showing 7 changed files with 586 additions and 107 deletions.
5 changes: 4 additions & 1 deletion frontend/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"development": {
"presets": ["react-hmre"]
}
}
},
"plugins": [
["import", { libraryName: "antd", style: true }] // `style: true` for less
]
}
5 changes: 4 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"author": "Utkarsh Gupta",
"license": "GPL-3.0",
"dependencies": {
"antd": "^2.10.0",
"body-parser": "^1.15.2",
"express": "^4.14.0",
"immutable": "^3.8.1",
"material-ui": "^0.18.0",
"prop-types": "^15.5.8",
"react": "^15.4.2",
"react-dom": "^15.3.2",
Expand All @@ -43,6 +43,7 @@
"babel-cli": "^6.18.0",
"babel-core": "^6.17.0",
"babel-loader": "^7.0.0",
"babel-plugin-import": "^1.1.1",
"babel-plugin-react-display-name": "^2.0.0",
"babel-plugin-transform-object-rest-spread": "^6.20.2",
"babel-polyfill": "^6.16.0",
Expand All @@ -67,6 +68,8 @@
"extract-text-webpack-plugin": "2.1.0",
"file-loader": "^0.11.1",
"jsdom": "^10.1.0",
"less": "^2.7.2",
"less-loader": "^4.0.3",
"mocha": "^3.1.0",
"nock": "^9.0.11",
"node-sass": "^4.5.2",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/home/HomePage.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import React, { Component } from "react";
import { PropTypes } from "prop-types";
import { Card } from "antd";

const HomePage = () => {
return (
<div>
Hello world.
<Card title="Ant Design" style={{ width: 300 }}>
<p>Everything is working fine</p>
</Card>
</div>
);
};
Expand Down
13 changes: 5 additions & 8 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import React from "react";
import { render } from "react-dom";
import { Provider } from "react-redux";
import { BrowserRouter as Router } from "react-router-dom";
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";
import injectTapEventPlugin from "react-tap-event-plugin";

import App from "./components/App";
Expand All @@ -15,12 +14,10 @@ const store = configureStore();
injectTapEventPlugin();

render(
<MuiThemeProvider>
<Provider store={store}>
<Router>
<App />
</Router>
</Provider>
</MuiThemeProvider>,
<Provider store={store}>
<Router>
<App />
</Router>
</Provider>,
document.getElementById("app")
);
1 change: 1 addition & 0 deletions frontend/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
},
{ test: /jquery\.js$/, loader: "expose?jQuery!expose?$" },
{ test: /(\.scss)$/, use: ["style-loader", "css-loader", "sass-loader"] },
{ test: /(\.less)$/, use: ["style-loader", "css-loader", "less-loader"] },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: ["file-loader"] },
{ test: /\.(woff|woff2)$/, loader: "url-loader?prefix=font/&limit=5000" },
{
Expand Down
1 change: 1 addition & 0 deletions frontend/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
},
{ test: /jquery\.js$/, loader: "expose?jQuery!expose?$" },
{ test: /(\.scss)$/, use: ["style-loader", "css-loader", "sass-loader"] },
{ test: /(\.less)$/, use: ["style-loader", "css-loader", "less-loader"] },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: ["file-loader"] },
{ test: /\.(woff|woff2)$/, loader: "url-loader?prefix=font/&limit=5000" },
{
Expand Down
Loading

0 comments on commit a28229f

Please sign in to comment.