Remove the original UI files
This commit is contained in:
parent
e505c21bc8
commit
7466ef2a6f
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
release:
|
|
||||||
NODE_ENV=production npm run build
|
|
||||||
|
|
||||||
dev:
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
server:
|
|
||||||
npx http-server ./dist
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"name": "ui",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"main": "webpack.config.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"build": "webpack"
|
|
||||||
},
|
|
||||||
"author": "",
|
|
||||||
"license": "GPL-3.0-or-later",
|
|
||||||
"dependencies": {
|
|
||||||
"react": "^18.2.0",
|
|
||||||
"react-dom": "^18.2.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/react": "^18.2.8",
|
|
||||||
"@types/react-dom": "^18.2.4",
|
|
||||||
"copy-webpack-plugin": "^11.0.0",
|
|
||||||
"ts-loader": "^9.4.3",
|
|
||||||
"webpack": "^5.85.0",
|
|
||||||
"webpack-cli": "^5.1.3"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
type PlayingField = {
|
|
||||||
backgroundImage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Client {
|
|
||||||
playingField(): PlayingField {
|
|
||||||
return { backgroundImage: "tower-in-mist.jpg" };
|
|
||||||
}
|
|
||||||
|
|
||||||
async getFile(filename: string): Promise<Blob | undefined> {
|
|
||||||
try {
|
|
||||||
const response = await fetch(`http://localhost:8001/api/v1/file/${filename}`);
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(`Response status: ${response.status}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const body = await response.blob();
|
|
||||||
return body;
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<div id="root"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,11 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom";
|
|
||||||
|
|
||||||
const App = () => <div>App</div>;
|
|
||||||
|
|
||||||
ReactDOM.render(
|
|
||||||
<React.StrictMode>
|
|
||||||
<App />
|
|
||||||
</React.StrictMode>,
|
|
||||||
document.getElementById("root")
|
|
||||||
);
|
|
|
@ -1,24 +0,0 @@
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
mode: "development",
|
|
||||||
entry: {
|
|
||||||
"main": "./src/main.tsx"
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{ test: /\.tsx?$/, use: "ts-loader", exclude: /node_modules/ }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
new CopyWebpackPlugin({
|
|
||||||
patterns: [
|
|
||||||
{ from: "src/index.html" },
|
|
||||||
{ from: "src/visions.css" },
|
|
||||||
]
|
|
||||||
})
|
|
||||||
],
|
|
||||||
resolve: {
|
|
||||||
extensions: ['.ts', '.tsx'],
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue