Initialize frontend app (#112)
This commit is contained in:
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@@ -92,3 +92,26 @@ jobs:
|
||||
|
||||
# Finally, run pre-commit.
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
|
||||
fe-lint-build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./skyvern-frontend
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run linter
|
||||
run: npm run lint
|
||||
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -167,3 +167,6 @@ har/
|
||||
|
||||
# Streamlit ignores
|
||||
**/secrets*.toml
|
||||
|
||||
## Frontend
|
||||
node_modules
|
||||
|
||||
27
skyvern-frontend/.eslintrc
Normal file
27
skyvern-frontend/.eslintrc
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"root": true,
|
||||
"env": { "browser": true, "es2020": true },
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"dist",
|
||||
".eslintrc.cjs",
|
||||
"vite.config.ts",
|
||||
"vitest.config.ts"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"plugins": ["react-refresh"],
|
||||
"rules": {
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ "allowConstantExport": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
3
skyvern-frontend/.husky/pre-commit
Normal file
3
skyvern-frontend/.husky/pre-commit
Normal file
@@ -0,0 +1,3 @@
|
||||
cd skyvern-frontend
|
||||
|
||||
npm run precommit
|
||||
5
skyvern-frontend/.prettierignore
Normal file
5
skyvern-frontend/.prettierignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.github/
|
||||
node_modules/
|
||||
build/
|
||||
coverage
|
||||
dist/
|
||||
29
skyvern-frontend/README.md
Normal file
29
skyvern-frontend/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Skyvern Frontend
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This will start the development server with hot module replacement.
|
||||
|
||||
## Build for production
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
This will make a production build in the `dist` directory, ready to be served.
|
||||
|
||||
## Preview the production build locally
|
||||
|
||||
```sh
|
||||
npm run preview
|
||||
```
|
||||
|
||||
or alternatively, use the `serve` package:
|
||||
|
||||
```sh
|
||||
npx serve@latest dist
|
||||
```
|
||||
13
skyvern-frontend/index.html
Normal file
13
skyvern-frontend/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Skyvern</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
3479
skyvern-frontend/package-lock.json
generated
Normal file
3479
skyvern-frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
44
skyvern-frontend/package.json
Normal file
44
skyvern-frontend/package.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "skyvern-frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc --noEmit && vite build",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"format": "prettier --write .",
|
||||
"preview": "vite preview",
|
||||
"prepare": "cd .. && husky skyvern-frontend/.husky",
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.64",
|
||||
"@types/react-dom": "^18.2.21",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.5",
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.2",
|
||||
"prettier": "^3.2.5",
|
||||
"typescript": "^5.4.2",
|
||||
"vite": "^5.1.6"
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,jsx,ts,tsx}": [
|
||||
"npm run lint"
|
||||
],
|
||||
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
|
||||
"prettier --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
5
skyvern-frontend/src/App.tsx
Normal file
5
skyvern-frontend/src/App.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
function App() {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
export default App;
|
||||
0
skyvern-frontend/src/index.css
Normal file
0
skyvern-frontend/src/index.css
Normal file
10
skyvern-frontend/src/main.tsx
Normal file
10
skyvern-frontend/src/main.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
import "./index.css";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
);
|
||||
1
skyvern-frontend/src/vite-env.d.ts
vendored
Normal file
1
skyvern-frontend/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
28
skyvern-frontend/tsconfig.json
Normal file
28
skyvern-frontend/tsconfig.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* annoying stuff */
|
||||
"noUncheckedIndexedAccess": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["./src/", "vite-env.d.ts"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
11
skyvern-frontend/tsconfig.node.json
Normal file
11
skyvern-frontend/tsconfig.node.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
7
skyvern-frontend/vite.config.ts
Normal file
7
skyvern-frontend/vite.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
});
|
||||
Reference in New Issue
Block a user