clan-app: Fix npm run build in ui-2d
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
../ui/index.html
|
|
||||||
14
pkgs/clan-app/ui-2d/index.html
Normal file
14
pkgs/clan-app/ui-2d/index.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Solid App</title>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
|
||||||
|
<script src="/src/index.tsx" type="module"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1 +0,0 @@
|
|||||||
../ui/package.json
|
|
||||||
93
pkgs/clan-app/ui-2d/package.json
Normal file
93
pkgs/clan-app/ui-2d/package.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"name": "@clan/ui",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"start": "vite",
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "npm run check && npm run test && vite build && npm run convert-html",
|
||||||
|
"convert-html": "node gtk.webview.js",
|
||||||
|
"serve": "vite preview",
|
||||||
|
"check": "tsc --noEmit --skipLibCheck && eslint ./src",
|
||||||
|
"test": "vitest run --project unit --typecheck",
|
||||||
|
"storybook": "storybook",
|
||||||
|
"storybook-build": "storybook build",
|
||||||
|
"storybook-dev": "storybook dev -p 6006",
|
||||||
|
"test-storybook": "vitest run --project storybook",
|
||||||
|
"test-storybook-update-snapshots": "vitest run --project storybook --update",
|
||||||
|
"test-storybook-static": "npm run storybook-build && concurrently -k -s first -n 'SB,TEST' -c 'magenta,blue' 'http-server storybook-static --port 6006 --silent' 'wait-on tcp:127.0.0.1:6006 && npm run test-storybook'"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|
||||||
|
"@eslint/js": "^9.3.0",
|
||||||
|
"@kachurun/storybook-solid-vite": "^9.0.11",
|
||||||
|
"@storybook/addon-a11y": "^9.0.8",
|
||||||
|
"@storybook/addon-docs": "^9.0.8",
|
||||||
|
"@storybook/addon-links": "^9.0.8",
|
||||||
|
"@storybook/addon-onboarding": "^9.0.8",
|
||||||
|
"@storybook/addon-viewport": "^9.0.8",
|
||||||
|
"@storybook/addon-vitest": "^9.0.8",
|
||||||
|
"@tailwindcss/typography": "^0.5.13",
|
||||||
|
"@types/json-schema": "^7.0.15",
|
||||||
|
"@types/node": "^22.15.19",
|
||||||
|
"@types/three": "^0.176.0",
|
||||||
|
"@typescript-eslint/parser": "^8.32.1",
|
||||||
|
"@vitest/browser": "^3.2.3",
|
||||||
|
"@vitest/coverage-v8": "^3.2.3",
|
||||||
|
"autoprefixer": "^10.4.19",
|
||||||
|
"classnames": "^2.5.1",
|
||||||
|
"concurrently": "^9.1.2",
|
||||||
|
"eslint": "^9.27.0",
|
||||||
|
"eslint-plugin-tailwindcss": "^3.17.0",
|
||||||
|
"http-server": "^14.1.1",
|
||||||
|
"jsdom": "^26.1.0",
|
||||||
|
"playwright": "~1.52.0",
|
||||||
|
"postcss": "^8.4.38",
|
||||||
|
"postcss-url": "^10.1.3",
|
||||||
|
"prettier": "^3.2.5",
|
||||||
|
"solid-devtools": "^0.34.0",
|
||||||
|
"storybook": "^9.0.8",
|
||||||
|
"tailwindcss": "^3.4.3",
|
||||||
|
"typescript": "^5.4.5",
|
||||||
|
"typescript-eslint": "^8.32.1",
|
||||||
|
"vite": "^6.3.5",
|
||||||
|
"vite-plugin-solid": "^2.8.2",
|
||||||
|
"vite-plugin-solid-svg": "^0.8.1",
|
||||||
|
"vitest": "^3.2.3",
|
||||||
|
"wait-on": "^8.0.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@floating-ui/dom": "^1.6.8",
|
||||||
|
"@kobalte/core": "^0.13.10",
|
||||||
|
"@kobalte/tailwindcss": "^0.9.0",
|
||||||
|
"@modular-forms/solid": "^0.25.1",
|
||||||
|
"@solid-primitives/storage": "^4.3.2",
|
||||||
|
"@solidjs/router": "^0.15.3",
|
||||||
|
"@tanstack/eslint-plugin-query": "^5.51.12",
|
||||||
|
"@tanstack/solid-query": "^5.76.0",
|
||||||
|
"corvu": "^0.7.1",
|
||||||
|
"material-icons": "^1.13.12",
|
||||||
|
"nanoid": "^5.0.7",
|
||||||
|
"solid-js": "^1.9.7",
|
||||||
|
"solid-markdown": "^2.0.13",
|
||||||
|
"solid-toast": "^0.5.0",
|
||||||
|
"three": "^0.176.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@esbuild/darwin-arm64": "^0.25.4",
|
||||||
|
"@esbuild/darwin-x64": "^0.25.4",
|
||||||
|
"@esbuild/linux-arm64": "^0.25.4",
|
||||||
|
"@esbuild/linux-x64": "^0.25.4"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"vite": {
|
||||||
|
"rollup": "npm:@rollup/wasm-node@^4.34.9"
|
||||||
|
},
|
||||||
|
"@rollup/rollup-darwin-x64": "npm:@rollup/wasm-node@^4.34.9",
|
||||||
|
"@rollup/rollup-linux-x64": "npm:@rollup/wasm-node@^4.34.9",
|
||||||
|
"@rollup/rollup-darwin-arm64": "npm:@rollup/wasm-node@^4.34.9",
|
||||||
|
"@rollup/rollup-linux-arm64": "npm:@rollup/wasm-node@^4.34.9"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
pkgs/clan-app/ui-2d/tests
Symbolic link
1
pkgs/clan-app/ui-2d/tests
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/tests
|
||||||
@@ -1 +0,0 @@
|
|||||||
../ui/vite.config.ts
|
|
||||||
54
pkgs/clan-app/ui-2d/vite.config.ts
Normal file
54
pkgs/clan-app/ui-2d/vite.config.ts
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import { defineConfig } from "vite";
|
||||||
|
import solidPlugin from "vite-plugin-solid";
|
||||||
|
import solidSvg from "vite-plugin-solid-svg";
|
||||||
|
import devtools from "solid-devtools/vite";
|
||||||
|
import path from "node:path";
|
||||||
|
import { exec } from "child_process";
|
||||||
|
|
||||||
|
// watch also clan-cli to catch api changes
|
||||||
|
const clanCliDir = path.resolve(__dirname, "../../clan-cli");
|
||||||
|
|
||||||
|
function regenPythonApiOnFileChange() {
|
||||||
|
return {
|
||||||
|
name: "run-python-script-on-change",
|
||||||
|
handleHotUpdate({}) {
|
||||||
|
exec("reload-python-api.sh", (err, stdout, stderr) => {
|
||||||
|
if (err) {
|
||||||
|
console.error(`reload-python-api.sh error:\n${stderr}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
configureServer(server: import("vite").ViteDevServer) {
|
||||||
|
server.watcher.add([clanCliDir]);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"@": path.resolve(__dirname, "./"), // This now points to ui-2d directory
|
||||||
|
},
|
||||||
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
include: ["debug", "extend"],
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
/*
|
||||||
|
Uncomment the following line to enable solid-devtools.
|
||||||
|
For more info see https://github.com/thetarnav/solid-devtools/tree/main/packages/extension#readme
|
||||||
|
*/
|
||||||
|
devtools(),
|
||||||
|
solidPlugin(),
|
||||||
|
solidSvg(),
|
||||||
|
regenPythonApiOnFileChange(),
|
||||||
|
],
|
||||||
|
server: {
|
||||||
|
port: 3000,
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
target: "safari11",
|
||||||
|
// assetsDi
|
||||||
|
manifest: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
1
pkgs/clan-app/ui-2d/vitest.config.ts
Symbolic link
1
pkgs/clan-app/ui-2d/vitest.config.ts
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/vitest.config.ts
|
||||||
Reference in New Issue
Block a user