Updated dependencies and removed bootstrap

This commit is contained in:
Martin Berg Alstad 2023-05-15 19:15:55 +02:00
parent 85de1237f4
commit 7669a67cd9
10 changed files with 94 additions and 179 deletions
.idea/.idea.pac-man-board-game/.idea
pac-man-board-game/ClientApp

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

@ -0,0 +1,10 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

@ -1,25 +1,23 @@
{ {
"name": "pac_man_board_game", "name": "pac_man_board_game",
"version": "0.1.0", "version": "0.1-Testing",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pac_man_board_game", "name": "pac_man_board_game",
"version": "0.1.0", "version": "0.1-Testing",
"dependencies": { "dependencies": {
"bootstrap": "^5.2.0",
"http-proxy-middleware": "^2.0.6", "http-proxy-middleware": "^2.0.6",
"jquery": "^3.6.0", "jquery": "^3.7.0",
"merge": "^2.1.1", "merge": "^2.1.1",
"oidc-client": "^1.11.5", "oidc-client": "^1.11.5",
"process": "^0.11.10", "process": "^0.11.10",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-router-bootstrap": "^0.26.2", "react-router-bootstrap": "^0.26.2",
"react-router-dom": "^6.3.0", "react-router-dom": "^6.11.1",
"react-scripts": "^5.0.1", "react-scripts": "^5.0.1",
"reactstrap": "^9.1.3",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"workbox-background-sync": "^6.5.4", "workbox-background-sync": "^6.5.4",
@ -39,16 +37,16 @@
"@types/jest": "^29.5.1", "@types/jest": "^29.5.1",
"@types/react": "^18.2.6", "@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4", "@types/react-dom": "^18.2.4",
"ajv": "^8.11.0", "ajv": "^8.12.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.22.0", "eslint": "^8.40.0",
"eslint-config-react-app": "^7.0.1", "eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.32.2",
"nan": "^2.16.0", "nan": "^2.17.0",
"typescript": "^4.7.4" "typescript": "^4.9.5"
} }
}, },
"node_modules/@alloc/quick-lru": { "node_modules/@alloc/quick-lru": {
@ -3898,15 +3896,6 @@
} }
} }
}, },
"node_modules/@popperjs/core": {
"version": "2.11.7",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@remix-run/router": { "node_modules/@remix-run/router": {
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.6.1.tgz", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.6.1.tgz",
@ -5903,24 +5892,6 @@
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
}, },
"node_modules/bootstrap": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz",
"integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"peerDependencies": {
"@popperjs/core": "^2.11.6"
}
},
"node_modules/brace-expansion": { "node_modules/brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@ -6181,11 +6152,6 @@
"resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz",
"integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA=="
}, },
"node_modules/classnames": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
"integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
},
"node_modules/clean-css": { "node_modules/clean-css": {
"version": "5.3.2", "version": "5.3.2",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz",
@ -6894,7 +6860,8 @@
"node_modules/csstype": { "node_modules/csstype": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==",
"dev": true
}, },
"node_modules/damerau-levenshtein": { "node_modules/damerau-levenshtein": {
"version": "1.0.8", "version": "1.0.8",
@ -7147,15 +7114,6 @@
"utila": "~0.4" "utila": "~0.4"
} }
}, },
"node_modules/dom-helpers": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz",
"integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==",
"dependencies": {
"@babel/runtime": "^7.8.7",
"csstype": "^3.0.2"
}
},
"node_modules/dom-serializer": { "node_modules/dom-serializer": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
@ -16434,30 +16392,11 @@
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz",
"integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg=="
}, },
"node_modules/react-fast-compare": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.1.tgz",
"integrity": "sha512-xTYf9zFim2pEif/Fw16dBiXpe0hoy5PxcD8+OwBnTtNLfIm3g6WxhKNurY+6OmdH1u6Ta/W/Vl6vjbYP1MFnDg=="
},
"node_modules/react-is": { "node_modules/react-is": {
"version": "18.2.0", "version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
"integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w=="
}, },
"node_modules/react-popper": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz",
"integrity": "sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==",
"dependencies": {
"react-fast-compare": "^3.0.1",
"warning": "^4.0.2"
},
"peerDependencies": {
"@popperjs/core": "^2.0.0",
"react": "^16.8.0 || ^17 || ^18",
"react-dom": "^16.8.0 || ^17 || ^18"
}
},
"node_modules/react-refresh": { "node_modules/react-refresh": {
"version": "0.11.0", "version": "0.11.0",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
@ -16610,38 +16549,6 @@
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}, },
"node_modules/react-transition-group": {
"version": "4.4.5",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
"integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"dom-helpers": "^5.0.1",
"loose-envify": "^1.4.0",
"prop-types": "^15.6.2"
},
"peerDependencies": {
"react": ">=16.6.0",
"react-dom": ">=16.6.0"
}
},
"node_modules/reactstrap": {
"version": "9.1.10",
"resolved": "https://registry.npmjs.org/reactstrap/-/reactstrap-9.1.10.tgz",
"integrity": "sha512-VMDiQNV8hKug1GFOHEymYUYxDnueYl44F+wREABuYy2RgvzDq7OL7T/T8OpUz6JAA+f9LeeHohXxFbpb+a/VmA==",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@popperjs/core": "^2.6.0",
"classnames": "^2.2.3",
"prop-types": "^15.5.8",
"react-popper": "^2.2.4",
"react-transition-group": "^4.4.2"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
}
},
"node_modules/read-cache": { "node_modules/read-cache": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
@ -18612,14 +18519,6 @@
"makeerror": "1.0.12" "makeerror": "1.0.12"
} }
}, },
"node_modules/warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"dependencies": {
"loose-envify": "^1.0.0"
}
},
"node_modules/watchpack": { "node_modules/watchpack": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",

@ -3,18 +3,16 @@
"version": "0.1-Testing", "version": "0.1-Testing",
"private": true, "private": true,
"dependencies": { "dependencies": {
"bootstrap": "^5.2.0",
"http-proxy-middleware": "^2.0.6", "http-proxy-middleware": "^2.0.6",
"jquery": "^3.6.0", "jquery": "^3.7.0",
"merge": "^2.1.1", "merge": "^2.1.1",
"oidc-client": "^1.11.5", "oidc-client": "^1.11.5",
"process": "^0.11.10", "process": "^0.11.10",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-router-bootstrap": "^0.26.2", "react-router-bootstrap": "^0.26.2",
"react-router-dom": "^6.3.0", "react-router-dom": "^6.11.1",
"react-scripts": "^5.0.1", "react-scripts": "^5.0.1",
"reactstrap": "^9.1.3",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"workbox-background-sync": "^6.5.4", "workbox-background-sync": "^6.5.4",
@ -34,16 +32,16 @@
"@types/jest": "^29.5.1", "@types/jest": "^29.5.1",
"@types/react": "^18.2.6", "@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4", "@types/react-dom": "^18.2.4",
"ajv": "^8.11.0", "ajv": "^8.12.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.22.0", "eslint": "^8.40.0",
"eslint-config-react-app": "^7.0.1", "eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.32.2",
"nan": "^2.16.0", "nan": "^2.17.0",
"typescript": "^4.7.4" "typescript": "^4.9.5"
}, },
"overrides": { "overrides": {
"autoprefixer": "10.4.5" "autoprefixer": "10.4.5"

@ -1,34 +1,34 @@
import React from "react"; import React from "react";
export const Home = () => export const Home = () =>
( (
<div> <div>
<h1>Hello, world!</h1> <h1>Hello, world!</h1>
<p>Welcome to your new single-page application, built with:</p> <p>Welcome to your new single-page application, built with:</p>
<ul> <ul>
<li><a href="https://get.asp.net/">ASP.NET Core</a> and <a <li><a href="https://get.asp.net/">ASP.NET Core</a> and <a
href="https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx">C#</a> for cross-platform server-side href="https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx">C#</a> for cross-platform server-side
code code
</li> </li>
<li><a href="https://facebook.github.io/react/">React</a> for client-side code</li> <li><a href="https://facebook.github.io/react/">React</a> for client-side code</li>
<li><a href="http://getbootstrap.com/">Bootstrap</a> for layout and styling</li> <li><a href="http://getbootstrap.com/">Bootstrap</a> for layout and styling</li>
</ul> </ul>
<p>To help you get started, we have also set up:</p> <p>To help you get started, we have also set up:</p>
<ul> <ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to <li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to
return here. return here.
</li> </li>
<li><strong>Development server integration</strong>. In development mode, the development server <li><strong>Development server integration</strong>. In development mode, the development server
from <code>create-react-app</code> runs in the background automatically, so your client-side from <code>create-react-app</code> runs in the background automatically, so your client-side
resources are dynamically built on demand and the page refreshes when you modify any file. resources are dynamically built on demand and the page refreshes when you modify any file.
</li> </li>
<li><strong>Efficient production builds</strong>. In production mode, development-time features are <li><strong>Efficient production builds</strong>. In production mode, development-time features are
disabled, and your <code>dotnet publish</code> configuration produces minified, efficiently bundled disabled, and your <code>dotnet publish</code> configuration produces minified, efficiently bundled
JavaScript files. JavaScript files.
</li> </li>
</ul> </ul>
<p>The <code>ClientApp</code> subdirectory is a standard React application based on <p>The <code>ClientApp</code> subdirectory is a standard React application based on
the <code>create-react-app</code> template. If you open a command prompt in that directory, you can the <code>create-react-app</code> template. If you open a command prompt in that directory, you can
run <code>npm</code> commands such as <code>npm test</code> or <code>npm install</code>.</p> run <code>npm</code> commands such as <code>npm test</code> or <code>npm install</code>.</p>
</div> </div>
); );

@ -1,12 +1,11 @@
import React, {Component, JSX} from "react"; import React, {JSX} from "react";
import {Container} from "reactstrap";
import {NavMenu} from "./NavMenu"; import {NavMenu} from "./NavMenu";
export const Layout = ({children}: { children: JSX.Element }) => ( export const Layout = ({children}: { children: JSX.Element }) => (
<div> <div>
<NavMenu/> <NavMenu/>
<Container tag="main"> <main>
{children} {children}
</Container> </main>
</div> </div>
); );

@ -1,5 +1,4 @@
import React from "react"; import React from "react";
import {Collapse, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink} from "reactstrap";
import {Link} from "react-router-dom"; import {Link} from "react-router-dom";
import "./NavMenu.css"; import "./NavMenu.css";
@ -13,25 +12,17 @@ export const NavMenu = () => {
return ( return (
<header> <header>
<Navbar className="navbar-expand-sm navbar-toggleable-sm ng-white border-bottom box-shadow mb-3" <nav className="navbar-expand-sm navbar-toggleable-sm ng-white border-bottom box-shadow mb-3">
container light> <Link to="/">pac_man_board_game</Link>
<NavbarBrand tag={Link} to="/">pac_man_board_game</NavbarBrand> <div onClick={toggleNavbar} className="mr-2"/>
<NavbarToggler onClick={toggleNavbar} className="mr-2"/> <div className="d-sm-inline-flex flex-sm-row-reverse">
<Collapse className="d-sm-inline-flex flex-sm-row-reverse" isOpen={!collapsed}
navbar>
<ul className="navbar-nav flex-grow"> <ul className="navbar-nav flex-grow">
<NavItem> <Link className="text-dark" to="/">Home</Link>
<NavLink tag={Link} className="text-dark" to="/">Home</NavLink> <Link className="text-dark" to="/counter">Counter</Link>
</NavItem> <Link className="text-dark" to="/fetch-data">Fetch data</Link>
<NavItem>
<NavLink tag={Link} className="text-dark" to="/counter">Counter</NavLink>
</NavItem>
<NavItem>
<NavLink tag={Link} className="text-dark" to="/fetch-data">Fetch data</NavLink>
</NavItem>
</ul> </ul>
</Collapse> </div>
</Navbar> </nav>
</header> </header>
); );
}; };

@ -1,5 +1,4 @@
import React from 'react'; import React from 'react';
import 'bootstrap/dist/css/bootstrap.css';
import {createRoot} from 'react-dom/client'; import {createRoot} from 'react-dom/client';
import {BrowserRouter} from 'react-router-dom'; import {BrowserRouter} from 'react-router-dom';
import {App} from './App'; import {App} from './App';