Commit 2480544e authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Removed unnecessary gui meta.json; manage fonts via yarn.

parent 09f239ff
Pipeline #97136 passed with stages
in 29 minutes and 7 seconds
const fs = require('fs')
const packageJson = require('./package.json')
const appCommit = packageJson.commit
const jsonData = {
commit: appCommit
}
var jsonContent = JSON.stringify(jsonData)
fs.writeFile('./public/meta.json', jsonContent, 'utf8', function(err) {
if (err) {
console.log('An error occured while writing JSON Object to meta.json')
return console.log(err)
}
console.log('meta.json file has been saved with latest version number')
})
......@@ -7,6 +7,8 @@
"../dependencies/materia"
],
"dependencies": {
"@fontsource/material-icons": "^4.2.1",
"@fontsource/titillium-web": "^4.2.2",
"@material-ui/core": "^4.0.0",
"@material-ui/icons": "^4.0.0",
"@material-ui/lab": "^4.0.0-alpha.49",
......@@ -62,8 +64,6 @@
"use-query-params": "^0.6.0"
},
"scripts": {
"generate-build-version": "node generateBuildVersion",
"prebuild": "npm run generate-build-version",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jest-environment-jsdom-sixteen --watchAll=false",
......
......@@ -22,6 +22,7 @@
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
......@@ -32,13 +33,6 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<!-- fonts needed by material-ui -->
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500"> -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium+Web:400,600">
<!-- icon fonts for the meta-info browser -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<title>NOMAD</title>
......
......@@ -69,7 +69,7 @@ class ErrorSnacksUnstyled extends React.Component {
} else if (error.message) {
errorStr = `Unexpected error: "${error.message}". Please try again and let us know, if this error keeps happening.`
}
} else if (typeof(error) === 'string' || error instanceof String) {
} else if (typeof error === 'string' || error instanceof String) {
errorStr = `${error} Please try to reload and let us know, if this error keeps happening.`
}
......@@ -127,8 +127,8 @@ export function withErrors(Component) {
export class ErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = { hasError: false };
super(props)
this.state = { hasError: false }
}
static propTypes = {
......@@ -136,9 +136,9 @@ export class ErrorBoundary extends React.Component {
onError: PropTypes.func
}
static getDerivedStateFromError(error) {
static getDerivedStateFromError(_error) {
// Update state so the next render will show the fallback UI.
return { hasError: true };
return { hasError: true }
}
componentDidCatch(error, errorInfo) {
......
......@@ -31,7 +31,6 @@ import { ErrorBoundary } from '../errors'
export const ScrollContext = React.createContext({scrollParentRef: null})
function ReloadSnack() {
const waitingServiceWorker = useRef(null)
const [reload, setReload] = useState(false)
......
......@@ -21,7 +21,9 @@ import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './components/App'
import '@fontsource/titillium-web/400.css'
import '@fontsource/titillium-web/600.css'
import '@fontsource/material-icons'
import * as serviceWorker from './serviceWorker'
export const serviceWorkerUpdateHandlerRef = {
......@@ -42,7 +44,7 @@ serviceWorker.register({
serviceWorkerRegistrationRef.current = registration
setInterval(() => {
registration.update()
console.debug("Checked for update...")
console.debug('Checked for update...')
}, (1000 * 60) * 30)
},
onUpdate: registration => {
......
......@@ -1165,6 +1165,16 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
 
"@fontsource/material-icons@^4.2.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@fontsource/material-icons/-/material-icons-4.2.1.tgz#b673a9a37a984721ff8edc9a9e8566c42081587d"
integrity sha512-u5JBOQ7lOWlBtkTTvhR2zM01sJIqLnt+tR6lEBFzYOU/J/eWZmI+C6QC3/HH7gWO2YQYRmxhI/OuyvzV0EiywQ==
"@fontsource/titillium-web@^4.2.2":
version "4.2.2"
resolved "https://registry.yarnpkg.com/@fontsource/titillium-web/-/titillium-web-4.2.2.tgz#7a3482e9421240674162de0706587126c0c35109"
integrity sha512-OQeXcX4UuuyttAq1qe49gz6Afxsl/3UOS1dqip3Sw0NYZFv4N4NdysX7Z0qJMtXm1yvXhVjjJ79iyTYr1qy33A==
"@hapi/address@2.x.x":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
......@@ -10046,6 +10056,7 @@ node-releases@^1.1.52, node-releases@^1.1.69:
"nomad-fair-gui@file:.":
version "0.10.1"
dependencies:
"@fontsource/titillium-web" "^4.2.2"
"@material-ui/core" "^4.0.0"
"@material-ui/icons" "^4.0.0"
"@material-ui/lab" "^4.0.0-alpha.49"
......@@ -10066,7 +10077,7 @@ node-releases@^1.1.52, node-releases@^1.1.69:
material-ui-chip-input "^1.0.0-beta.14"
material-ui-flat-pagination "^4.0.0"
mathjs "^7.1.0"
nomad-fair-gui "file:../../../.cache/yarn/v6/npm-nomad-fair-gui-0.10.1-f8e02023-90bb-473d-8c51-03dddb2be5c9-1616096663867/node_modules/nomad-fair-gui"
nomad-fair-gui "file:../../../../Library/Caches/Yarn/v6/npm-nomad-fair-gui-0.10.1-caae6be0-51b7-44c5-86db-e97037c5c024-1617035416277/node_modules/nomad-fair-gui"
object-hash "^2.0.3"
pace "^0.0.4"
pace-js "^1.0.2"
......
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