Skip to content

Commit a29485b

Browse files
authored
v2: add playground (#438)
copying over!
1 parent 72dfc53 commit a29485b

21 files changed

+3758
-2
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build/
22
node_modules/
3+
playground/
34
coverage/
45
.venv/
56
.mypy_cache/

playground/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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?
25+
26+
# Sentry Config File
27+
.env.sentry-build-plugin

playground/.netlify/state.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"siteId": "34768e35-903f-4f55-807d-916f993f368e"
3+
}

playground/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# playground
2+
3+
## dev
4+
5+
```shell
6+
pnpm dev
7+
```
8+
9+
```shell
10+
cargo install wasm-pack
11+
```
12+
13+
## deploy
14+
15+
```shell
16+
npm run build
17+
18+
# deploy to preview
19+
netlify deploy
20+
21+
# check it looks good, then deploy to prod
22+
netlify deploy --prod
23+
```

playground/eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import js from "@eslint/js"
2+
import globals from "globals"
3+
import reactHooks from "eslint-plugin-react-hooks"
4+
import reactRefresh from "eslint-plugin-react-refresh"
5+
import tseslint from "typescript-eslint"
6+
7+
export default tseslint.config(
8+
{ ignores: ["dist"] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ["**/*.{ts,tsx}"],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
"react-refresh/only-export-components": [
23+
"warn",
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
},
28+
)

playground/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="/owl.png" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Squawk Playground</title>
8+
</head>
9+
<body class="bg-[rgb(30,30,30)] select-none">
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

playground/package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "vite-project",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "wasm-pack build --target web ../crates/wasm --out-dir ../../playground/src/pkg && vite build",
9+
"deploy": "netlify deploy --prod",
10+
"lint": "eslint .",
11+
"preview": "vite preview"
12+
},
13+
"dependencies": {
14+
"@sentry/react": "^9.15.0",
15+
"@sentry/vite-plugin": "^3.3.1",
16+
"@tailwindcss/vite": "^4.0.6",
17+
"lz-string": "^1.5.0",
18+
"monaco-editor": "^0.52.2",
19+
"prettier": "^3.5.3",
20+
"react": "^19.0.0",
21+
"react-dom": "^19.0.0",
22+
"tailwindcss": "^4.0.6"
23+
},
24+
"devDependencies": {
25+
"@eslint/js": "^9.19.0",
26+
"@types/react": "^19.0.8",
27+
"@types/react-dom": "^19.0.3",
28+
"@vitejs/plugin-react": "^4.3.4",
29+
"babel-plugin-react-compiler": "19.1.0-rc.1",
30+
"eslint": "^9.19.0",
31+
"eslint-plugin-react-hooks": "6.0.0-rc1",
32+
"eslint-plugin-react-refresh": "^0.4.18",
33+
"globals": "^15.14.0",
34+
"typescript": "~5.7.2",
35+
"typescript-eslint": "^8.22.0",
36+
"vite": "^6.1.0"
37+
}
38+
}

0 commit comments

Comments
 (0)