Commit d4abc5cf authored by Paul R Otto's avatar Paul R Otto
Browse files

Merge branch 'gothree-frontend' into 178-about-page-3.0

merging in front end changes to modify for about page
parents 38417e23 09d53efc
import React from 'react';
export default class HomePage extends React.Component {
state = {};
render() {
return (
<div>
<p>Hello World! 1</p>
</div>
);
}
}
import HomePage from './HomePage';
export { HomePage };
import { HomePage } from './Pages';
export { HomePage };
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter, Route, Link } from 'react-router-dom';
import { HomePage } from './Components';
const Dhaynes = () => <p>dhaynes</p>;
const App = () => (
<div>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/dhaynes">dhaynes</Link>
</li>
</ul>
<Route path="/" exact component={HomePage} />
<Route path="/dhaynes" component={Dhaynes} />
</div>
);
ReactDOM.render(
<HashRouter>
<App />
</HashRouter>,
document.getElementById('root')
);
import React from "react";
import ReactDOM from "react-dom";
ReactDOM.render(
<div>
<p>Hello Go 3 with React!</p>
</div>,
document.getElementById("root")
);
...@@ -8,18 +8,26 @@ ...@@ -8,18 +8,26 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"private": false, "private": false,
"scripts": { "scripts": {
"dev": "webpack --mode development ./go/go_ahead/src/index.jsx --output ./go/static/main.js --watch", "start": "yarn dev",
"dev": "webpack --mode development ./go/go_ahead/src/index.js --output ./go/static/main.js --watch",
"build": "webpack --mode production ./project/frontend/src/index.js --output ./go/static/main.js" "build": "webpack --mode production ./project/frontend/src/index.js --output ./go/static/main.js"
}, },
"babel": { "babel": {
"presets": [ "presets": [
"es2015", "@babel/preset-env",
"react" "@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
] ]
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0",
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-loader": "^7.1.5", "babel-loader": "^8.0.4",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
...@@ -27,6 +35,7 @@ ...@@ -27,6 +35,7 @@
"babel-preset-stage-2": "^6.24.1", "babel-preset-stage-2": "^6.24.1",
"react": "^16.4.2", "react": "^16.4.2",
"react-dom": "^16.4.2", "react-dom": "^16.4.2",
"react-router-dom": "^4.3.1",
"webpack": "^4.16.4", "webpack": "^4.16.4",
"webpack-cli": "^3.1.0" "webpack-cli": "^3.1.0"
} }
......
module.exports = { module.exports = {
module: { module: {
rules: [{ rules: [
test: /\.jsx$/, {
test: /\.(js|jsx)$/,
exclude: /node_modules/, exclude: /node_modules/,
use: { use: ['babel-loader'],
loader: "babel-loader" },
} ],
}] },
} resolve: {
extensions: ['*', '.js', '.jsx'],
},
}; };
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment