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

Commit

Permalink
Paring back create-react-app and initialising govuk-react-jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
andymantell committed Feb 17, 2020
1 parent e7c7820 commit 2bcdfb4
Show file tree
Hide file tree
Showing 17 changed files with 1,028 additions and 323 deletions.
1,031 changes: 1,000 additions & 31 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -6,8 +6,11 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.0",
"@testing-library/user-event": "^7.2.1",
"govuk-react-jsx": "^1.3.0",
"node-sass": "^4.13.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.0"
},
"scripts": {
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
31 changes: 2 additions & 29 deletions public/index.html
Expand Up @@ -2,42 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="Example app for demonstrating how to use govuk-react-jsx"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>govuk-react-jsx examples</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

28 changes: 10 additions & 18 deletions src/App.js
@@ -1,25 +1,17 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import { Template } from 'govuk-react-jsx';
import { Route, BrowserRouter as Router } from 'react-router-dom';
import { HelloWorld } from './HelloWorld';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<Router>
<Template>
<Route exact path="/">
<HelloWorld />
</Route>
</Template>
</Router>
);
}

Expand Down
9 changes: 0 additions & 9 deletions src/App.test.js

This file was deleted.

10 changes: 10 additions & 0 deletions src/HelloWorld.js
@@ -0,0 +1,10 @@
import React from 'react';

function HelloWorld() {
return <>
<h1 className="govuk-heading-l">Hello world</h1>
<p className="govuk-body">Hello world</p>
</>
}

export { HelloWorld }
13 changes: 0 additions & 13 deletions src/index.css

This file was deleted.

8 changes: 1 addition & 7 deletions src/index.js
@@ -1,12 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './styles.scss';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(<App />, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
7 changes: 0 additions & 7 deletions src/logo.svg

This file was deleted.

141 changes: 0 additions & 141 deletions src/serviceWorker.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/setupTests.js

This file was deleted.

2 changes: 2 additions & 0 deletions src/styles.scss
@@ -0,0 +1,2 @@
$govuk-assets-path: "~govuk-frontend/govuk/assets/";
@import "~govuk-frontend/govuk/all";

0 comments on commit 2bcdfb4

Please sign in to comment.