frontend hello world

This commit is contained in:
Stepan Usatiuk
2023-12-15 19:41:01 +01:00
parent d18b7f2b3e
commit 1e2c667bf4
9 changed files with 3804 additions and 0 deletions

12
client/.gitignore vendored Normal file
View File

@@ -0,0 +1,12 @@
.idea/
node_modules/
build/
tmp/
temp/
dist/
.env
.cache
.directory
.history
.parcel-cache
frontend-reports/

9
client/.parcelrc Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
},
"validators": {
"*.{ts,tsx}": ["@parcel/validator-typescript"]
}
}

5
client/.prettierrc Normal file
View File

@@ -0,0 +1,5 @@
{
"trailingComma": "all",
"tabWidth": 4,
"endOfLine": "auto"
}

3711
client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

26
client/package.json Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "yclient",
"version": "0.0.1",
"private": true,
"author": "Stepan Usatiuk",
"source": "src/index.html",
"scripts": {
"start": "parcel",
"build": "parcel build"
},
"browserslist": "> 0.5%, last 2 versions, not dead",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@parcel/transformer-typescript-tsc": "^2.10.3",
"@parcel/validator-typescript": "^2.10.3",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.17",
"parcel": "^2.10.3",
"prettier": "^3.1.1",
"process": "^0.11.10",
"typescript": "^5.3.3"
}
}

3
client/src/App.tsx Normal file
View File

@@ -0,0 +1,3 @@
export function App() {
return <h1>Hello worlffffd!</h1>;
}

11
client/src/index.html Normal file
View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Hello world</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="index.tsx"></script>
</body>
</html>

6
client/src/index.tsx Normal file
View File

@@ -0,0 +1,6 @@
import { createRoot } from "react-dom/client";
import { App } from "./App";
const container = document.getElementById("app")!;
const root = createRoot(container);
root.render(<App />);

21
client/tsconfig.json Normal file
View File

@@ -0,0 +1,21 @@
{
"compilerOptions": {
"lib": [
"ES2023",
"dom"
],
"jsx": "react-jsx",
"target": "es5",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"isolatedModules": true
},
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
]
}