Port to React 18 / Node 17, add 1.19 info

This commit is contained in:
oitsjustjose 2022-09-07 10:20:14 -05:00
commit ce787140e1
17 changed files with 9611 additions and 14960 deletions

View file

@ -1,4 +1,4 @@
FROM node:14-alpine AS builder
FROM node:16-alpine AS builder
WORKDIR /app
@ -9,7 +9,7 @@ COPY . .
RUN npm run build
FROM node:14-alpine AS server
FROM node:16-alpine AS server
ENV NODE_ENV=production

14901
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -7,10 +7,8 @@
"@fortawesome/free-brands-svg-icons": "^5.14.0",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"bootstrap": "^5.0.0-alpha1",
"@popperjs/core": "^2.11.6",
"bootstrap": "^5.2.0",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-cypress": "^2.11.2",
@ -19,11 +17,10 @@
"eslint-plugin-react": "^7.21.4",
"eslint-plugin-react-hooks": "^4.1.2",
"font-awesome": "^4.7.0",
"popper.js": "^1.16.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"react-syntax-highlighter": "^15.4.3",
"react-transition-group": "^4.4.1",
"semver": "^7.3.2",

View file

@ -1,20 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/me.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="A Wiki for oitsjustjose's mods!"
/>
<meta name="description" content="A Wiki for oitsjustjose's mods!" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/me.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>oitsjustjose's Mods</title>
</head>
<body>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
</body>
</html>

29
src/App.jsx Normal file
View file

@ -0,0 +1,29 @@
import React from 'react';
import { BrowserRouter, Route, Routes as RouterRoutes } from 'react-router-dom';
import Home from './components/Home';
import Geolosys from './components/mods/Geolosys';
import NaturalProgressions from './components/mods/Natural Progressions';
import PersistentBits from './components/mods/Persistent Bits';
import Pulver from './components/mods/Pulver';
import TinkersAddons from './components/mods/Tinkers Addons';
import VTweaks from './components/mods/V-Tweaks';
import NavBar from './components/nav/Navbar';
export default () => (
<BrowserRouter>
<>
<NavBar />
<div style={{ paddingTop: `${3.5}em` }} />
</>
<RouterRoutes>
<Route exact path="/" element={(<Home />)} />
<Route path="/Geolosys" element={(<Geolosys />)} />
<Route path="/V-Tweaks" element={(<VTweaks />)} />
<Route path="/PersistentBits" element={(<PersistentBits />)} />
<Route path="/NaturalProgressions" element={(<NaturalProgressions />)} />
<Route path="/TinkersAddons" element={(<TinkersAddons />)} />
<Route path="/Pulver" element={(<Pulver />)} />
</RouterRoutes>
</BrowserRouter>
);

BIN
src/assets/img/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View file

@ -11,7 +11,7 @@ export default () => (
^
</h1>
<h1>
oitsjustjose's Mod Wiki
oitsjustjose&apos;s Mod Wiki
</h1>
<h5>
Brief guides for each and every mod to get you started!

View file

@ -1,3 +1,4 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React, { useState } from 'react';
import { CSSTransition } from 'react-transition-group';
import About from './GeolosysComponents/About';
@ -83,7 +84,7 @@ export default () => {
<li className="nav-item dropdown">
<a
className={`nav-link dropdown-toggle ${component.endsWith('-archive') ? 'active' : ''}`}
href="/"
href="#"
id="geolosysDocsDD"
role="button"
data-bs-toggle="dropdown"

View file

@ -3,6 +3,7 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { nord } from 'react-syntax-highlighter/dist/esm/styles/prism';
import Version6Dp from './Templates/Version6Dp';
import Version7Dp from './Templates/Version7Dp';
import Version7Dp119 from './Templates/Version7Dp1.19';
export default () => (
<div className="pb-5">
@ -211,6 +212,26 @@ export default () => (
</div>
</div>
</div>
<div className="accordion-item">
<h2 className="accordion-header" id="acc-7.x-1.19">
<button className="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-controls="collapseThree">
Geolosys 7.x (1.19)
</button>
</h2>
<div id="collapseThree" className="accordion-collapse collapse" aria-labelledby="acc-7.x-1.19" data-bs-parent="#version-acc">
<div className="accordion-body">
{Object.entries(Version7Dp119).map(([title, json5]) => (
<div>
<h3><code>{title}</code></h3>
<SyntaxHighlighter language="json5" style={nord}>
{json5}
</SyntaxHighlighter>
</div>
))}
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,149 @@
/* eslint-disable camelcase */
const deposit_dense = `
{ /* Notes / Comments ↓ */
"type": "geolosys:deposit_dense", /* This tells Geolosys how to generate this pluton */
"config": {
"yMin": 5, /* The Minimum Y-level the deposit can gen */
"yMax": 30, /* The Maximum Y-level the deposit can gen */
"size": 40, /* The Maximum dx/dy/dz from the center of the pluton */
"biomeTag": "#geolosys:all_dimensions", /* The biome tag you wish to generate this deposit in */
"blockStateMatchers": [ "minecraft:stone" ] /* The blocks you want this deposit to be able to replace */
"blocks": { /* List of blocks to use within this pluton. null = skip */
"default": [{ /* Blocks now MUST have a "default" */
"block": "geolosys:gold_ore",
"chance": 1.0
}],
"minecraft:deepslate": [{ /* This says "if you replace deepslate use this ore instead */
"block": "geolosys:deepslate_gold_ore",
"chance": 1.0
}]
}
"samples": [{ /* List of samples to use within this pluton. null = skip */
"block": "geolosys:ancient_debris_ore_sample", /* Samples format are unchanged from Geolosys 6 */
"chance": 1.0
}],
"generationWeight": 1 /* The weight for this specific pluton to generate */
}
}`;
const deposit_dike = `
{ /* Notes / Comments ↓ */
"type": "geolosys:deposit_dike", /* This tells Geolosys how to generate this pluton */
"config": {
"yMin": 8, /* The Minimum Y-level the deposit can gen */
"yMax": 22, /* The Maximum Y-level the deposit can gen */
"baseRadius": 3, /* The Base radius of the deposit when the dike is formed */
"biomeTag": "#geolosys:all_dimensions", /* The biome tag you wish to generate this deposit in */
"blockStateMatchers": [ "minecraft:netherrack" ] /* The blocks you want this deposit to be able to replace */
"blocks": { /* List of blocks to use within this pluton. null = skip */
"default": [{ /* Blocks now MUST have a "default" */
"block": "geolosys:gold_ore",
"chance": 0.9
}, {
"block": null,
"chance": 0.1
}],
"minecraft:netherrack": [{ /* This says "if you replace lava use this ore instead */
"block": "geolosys:nether_gold_ore",
"chance": 1.0
}]
},
"samples": [{ /* List of samples to use within this pluton. null = skip */
"block": "geolosys:gold_ore_sample", /* Samples format are unchanged from Geolosys 6 */
"chance": 1.0
}],
"generationWeight": 1 /* The weight for this specific pluton to generate */
}
}`;
const deposit_sparse = `
{ /* Notes / Comments ↓ */
"type": "geolosys:deposit_sparse", /* This tells Geolosys how to generate this pluton */
"config": {
"yMin": 16, /* The Minimum Y-level the deposit can gen */
"yMax": 50, /* The Maximum Y-level the deposit can gen */
"size": 32, /* Tweaks size similar to a Dense deposit */
"spread": 32, /* Gens a dense deposit then adds rnad(spread) to each block*/
"biomeTag": "#geolosys:all_dimensions", /* The biome tag you wish to generate this deposit in */
"blockStateMatchers": [ "minecraft:stone" ] /* The blocks you want this deposit to be able to replace */
"blocks": { /* List of blocks to use within this pluton. null = skip */
"default": [{ /* Blocks now MUST have a "default" */
"block": "geolosys:galena_ore",
"chance": 1.0
}],
"minecraft:deepslate": [{ /* This says "if you replace deepslate use this ore instead */
"block": "geolosys:deepslate_galena_ore",
"chance": 1.0
}]
},
"samples": [{ /* List of samples to use within this pluton. null = skip */
"block": "geolosys:galena_ore_sample", /* Samples format are unchanged from Geolosys 6 */
"chance": 1.0
}],
"generationWeight": 1 /* The weight for this specific pluton to generate */
}
}`;
const deposit_layer = `
{ /* Notes / Comments ↓ */
"type": "geolosys:deposit_layer", /* This tells Geolosys how to generate this pluton */
"config": {
"yMin": 40, /* The Minimum Y-level the deposit can gen */
"yMax": 70, /* The Maximum Y-level the deposit can gen */
"radius": 3, /* The radius of the layer (noise is added) */
"depth": 4, /* The height of the layer deposit */
"biomeTag": "#geolosys:all_dimensions", /* The biome tag you wish to generate this deposit in */
"blockStateMatchers": [ "minecraft:stone" ] /* The blocks you want this deposit to be able to replace */
"blocks": { /* List of blocks to use within this pluton. null = skip */
"default": [{ /* Blocks now MUST have a "default" */
"block": "geolosys:lignite_coal_ore",
"chance": 1.0
}],
"minecraft:deepslate": [{ /* This says "if you replace deepslate use this ore instead */
"block": "geolosys:deepslate_lignite_coal_ore",
"chance": 1.0
}]
},
"samples": [{ /* List of samples to use within this pluton. null = skip */
"block": "geolosys:lignite_coal_ore_sample", /* Samples format are unchanged from Geolosys 6 */
"chance": 1.0
}],
"generationWeight": 1 /* The weight for this specific pluton to generate */
}
}`;
const deposit_top_layer = `
{ /* Notes / Comments ↓ */
"type": "geolosys:top_deposit_layer", /* This tells Geolosys how to generate this pluton */
"config": { /* YMIN/MAX IS NOT PERMITTED BC. USE LAYER IF YOU NEED IT */
"radius": 4, /* The radius of the layer (noise is added) */
"depth": 4, /* The height of the layer deposit */
"chanceForSample": 0.25, /* The chance for a sample block to be generated */
"biomeTag": "#geolosys:all_dimensions", /* The biome tag you wish to generate this deposit in */
"blockStateMatchers": [ "minecraft:dirt" ] /* The blocks you want this deposit to be able to replace */
"blocks": { /* List of blocks to use within this pluton. null = skip */
"default": [{ /* Blocks now MUST have a "default" */
"block": "geolosys:peat",
"chance": 1.0
}],
"minecraft:dirt": [{ /* This says "if you replace dirt use this ore instead */
"block": "geolosys:peat",
"chance": 1.0
}]
},
"samples": [{ /* List of samples to use within this pluton. null = skip */
"block": "geolosys:rhododendron", /* Samples format are unchanged from Geolosys 6 */
"chance": 1.0
}],
"generationWeight": 1 /* The weight for this specific pluton to generate */
}
}
`;
export default {
deposit_dense,
deposit_dike,
deposit_sparse,
deposit_layer,
deposit_top_layer,
};

View file

@ -18,28 +18,28 @@
}
.geolosys.masthead {
background: url("/img/geolosys/cover.jpg");
background: url("/src/assets/img/geolosys/cover.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.vtweaks.masthead {
background: url("/img/vtweaks/cover.png");
background: url("/src/assets/img/vtweaks/cover.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.pb.masthead {
background: url("/img/persistentbits/cover.png");
background: url("/src/assets/img/persistentbits/cover.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.np.masthead {
background: url("/img/natpro/cover.png");
background: url("/src/assets/img/natpro/cover.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;

View file

@ -1,36 +1,9 @@
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap/dist/js/bootstrap.bundle.js';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import Home from './components/Home';
import Geolosys from './components/mods/Geolosys';
import NaturalProgressions from './components/mods/Natural Progressions';
import PersistentBits from './components/mods/Persistent Bits';
import Pulver from './components/mods/Pulver';
import TinkersAddons from './components/mods/Tinkers Addons';
import VTweaks from './components/mods/V-Tweaks';
import NavBar from './components/nav/Navbar';
import 'bootstrap/dist/js/bootstrap.bundle';
import { createRoot } from 'react-dom/client';
import App from './App';
import './css/app.css';
import * as serviceWorker from './serviceWorker';
const routing = (
<Router>
<NavBar />
<div style={{ paddingTop: `${3.5}em` }} />
<Route exact path="/" component={Home} />
<Route path="/Geolosys" component={Geolosys} />
<Route path="/V-Tweaks" component={VTweaks} />
<Route path="/PersistentBits" component={PersistentBits} />
<Route path="/NaturalProgressions" component={NaturalProgressions} />
<Route path="/TinkersAddons" component={TinkersAddons} />
<Route path="/Pulver" component={Pulver} />
</Router>
);
ReactDOM.render(routing, 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();
const container = document.getElementById('root');
const root = createRoot(container);
root.render(App());

9382
yarn.lock Normal file

File diff suppressed because it is too large Load diff