Skip to content

Commit 8a832b2

Browse files
authored
add ui-web (#516)
1 parent 0baac09 commit 8a832b2

22 files changed

+555
-9
lines changed

apps/ui-web/.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

apps/ui-web/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

apps/ui-web/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13+
14+
- Configure the top-level `parserOptions` property like this:
15+
16+
```js
17+
parserOptions: {
18+
ecmaVersion: 'latest',
19+
sourceType: 'module',
20+
project: ['./tsconfig.json', './tsconfig.node.json'],
21+
tsconfigRootDir: __dirname,
22+
},
23+
```
24+
25+
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
26+
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
27+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list

apps/ui-web/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>CodePod IDE: Interactive Development At Scale</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

apps/ui-web/package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "ui-web",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite --host",
8+
"build": "tsc && vite build",
9+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@apollo/client": "^3.8.3",
14+
"@codepod/ui": "workspace:^",
15+
"@emotion/react": "^11.11.1",
16+
"@emotion/styled": "^11.11.0",
17+
"@mui/icons-material": "^5.10.9",
18+
"@mui/material": "^5.14.5",
19+
"notistack": "^2.0.8",
20+
"react": "^18.2.0",
21+
"react-dom": "^18.2.0",
22+
"react-router-dom": "^6.4.2"
23+
},
24+
"devDependencies": {
25+
"@types/node": "^20.5.9",
26+
"@types/react": "^18.2.15",
27+
"@types/react-dom": "^18.2.7",
28+
"@typescript-eslint/eslint-plugin": "^6.0.0",
29+
"@typescript-eslint/parser": "^6.0.0",
30+
"@vitejs/plugin-react-swc": "^3.3.2",
31+
"eslint": "^8.45.0",
32+
"eslint-plugin-react-hooks": "^4.6.0",
33+
"eslint-plugin-react-refresh": "^0.4.3",
34+
"typescript": "^5.0.2",
35+
"vite": "^4.4.5",
36+
"vite-plugin-checker": "^0.6.2"
37+
}
38+
}

apps/ui-web/public/favicon.ico

4.19 KB
Binary file not shown.

apps/ui-web/public/logo192.png

3.18 KB
Loading

apps/ui-web/public/logo512.png

9.44 KB
Loading
228 KB
Binary file not shown.
258 KB
Binary file not shown.

0 commit comments

Comments
 (0)