Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 2bcdfb4

Browse files
committed
Paring back create-react-app and initialising govuk-react-jsx
1 parent e7c7820 commit 2bcdfb4

File tree

17 files changed

+1028
-323
lines changed

17 files changed

+1028
-323
lines changed

package-lock.json

Lines changed: 1000 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
"@testing-library/jest-dom": "^4.2.4",
77
"@testing-library/react": "^9.4.0",
88
"@testing-library/user-event": "^7.2.1",
9+
"govuk-react-jsx": "^1.3.0",
10+
"node-sass": "^4.13.1",
911
"react": "^16.12.0",
1012
"react-dom": "^16.12.0",
13+
"react-router-dom": "^5.1.2",
1114
"react-scripts": "3.4.0"
1215
},
1316
"scripts": {

public/favicon.ico

-3.08 KB
Binary file not shown.

public/index.html

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,15 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
65
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<meta name="theme-color" content="#000000" />
86
<meta
97
name="description"
10-
content="Web site created using create-react-app"
8+
content="Example app for demonstrating how to use govuk-react-jsx"
119
/>
12-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
17-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
19-
Notice the use of %PUBLIC_URL% in the tags above.
20-
It will be replaced with the URL of the `public` folder during the build.
21-
Only files inside the `public` folder can be referenced from the HTML.
22-
23-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24-
work correctly both with client-side routing and a non-root public URL.
25-
Learn how to configure a non-root public URL by running `npm run build`.
26-
-->
27-
<title>React App</title>
10+
<title>govuk-react-jsx examples</title>
2811
</head>
2912
<body>
3013
<noscript>You need to enable JavaScript to run this app.</noscript>
3114
<div id="root"></div>
32-
<!--
33-
This HTML file is a template.
34-
If you open it directly in the browser, you will see an empty page.
35-
36-
You can add webfonts, meta tags, or analytics to this file.
37-
The build step will place the bundled scripts into the <body> tag.
38-
39-
To begin the development, run `npm start` or `yarn start`.
40-
To create a production bundle, use `npm run build` or `yarn build`.
41-
-->
4215
</body>
4316
</html>

public/logo192.png

-5.22 KB
Binary file not shown.

public/logo512.png

-9.44 KB
Binary file not shown.

public/manifest.json

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

src/App.css

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

src/App.js

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
import React from 'react';
2-
import logo from './logo.svg';
3-
import './App.css';
2+
import { Template } from 'govuk-react-jsx';
3+
import { Route, BrowserRouter as Router } from 'react-router-dom';
4+
import { HelloWorld } from './HelloWorld';
45

56
function App() {
67
return (
7-
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
10-
<p>
11-
Edit <code>src/App.js</code> and save to reload.
12-
</p>
13-
<a
14-
className="App-link"
15-
href="https://reactjs.org"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>
19-
Learn React
20-
</a>
21-
</header>
22-
</div>
8+
<Router>
9+
<Template>
10+
<Route exact path="/">
11+
<HelloWorld />
12+
</Route>
13+
</Template>
14+
</Router>
2315
);
2416
}
2517

src/App.test.js

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

0 commit comments

Comments
 (0)