clan-app: Add more symlinks to ui-2d
This commit is contained in:
@@ -1,43 +0,0 @@
|
|||||||
## Usage
|
|
||||||
|
|
||||||
Those templates dependencies are maintained via [pnpm](https://pnpm.io) via
|
|
||||||
`pnpm up -Lri`.
|
|
||||||
|
|
||||||
This is the reason you see a `pnpm-lock.yaml`. That being said, any package
|
|
||||||
manager will work. This file can be safely be removed once you clone a template.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install # or pnpm install or yarn install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
|
|
||||||
|
|
||||||
## Available Scripts
|
|
||||||
|
|
||||||
In the project directory, you can run:
|
|
||||||
|
|
||||||
### `npm run dev` or `npm start`
|
|
||||||
|
|
||||||
Runs the app in the development mode.<br> Open
|
|
||||||
[http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
||||||
|
|
||||||
The page will reload if you make edits.<br>
|
|
||||||
|
|
||||||
### `npm run build`
|
|
||||||
|
|
||||||
Builds the app for production to the `dist` folder.<br> It correctly bundles
|
|
||||||
Solid in production mode and optimizes the build for the best performance.
|
|
||||||
|
|
||||||
The build is minified and the filenames include the hashes.<br> Your app is
|
|
||||||
ready to be deployed!
|
|
||||||
|
|
||||||
### `npm run storybook`
|
|
||||||
|
|
||||||
Starts an instance of [storybook](https://storybook.js.org/).
|
|
||||||
|
|
||||||
For more info on how to write stories, please [see here](https://storybook.js.org/docs).
|
|
||||||
|
|
||||||
## Deployment
|
|
||||||
|
|
||||||
You can deploy the `dist` folder to any static host provider (netlify, surge,
|
|
||||||
now, etc.)
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import eslint from "@eslint/js";
|
|
||||||
import tseslint from "typescript-eslint";
|
|
||||||
import tailwind from "eslint-plugin-tailwindcss";
|
|
||||||
import pluginQuery from "@tanstack/eslint-plugin-query";
|
|
||||||
import { globalIgnores } from "eslint/config";
|
|
||||||
|
|
||||||
const config = tseslint.config(
|
|
||||||
eslint.configs.recommended,
|
|
||||||
...pluginQuery.configs["flat/recommended"],
|
|
||||||
...tseslint.configs.strict,
|
|
||||||
...tseslint.configs.stylistic,
|
|
||||||
...tailwind.configs["flat/recommended"],
|
|
||||||
globalIgnores(["src/types/index.d.ts"]),
|
|
||||||
{
|
|
||||||
rules: {
|
|
||||||
"tailwindcss/no-contradicting-classname": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
callees: ["cx"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"tailwindcss/no-custom-classname": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
callees: ["cx"],
|
|
||||||
whitelist: ["material-icons"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// TODO: make this more strict by removing later
|
|
||||||
"no-unused-vars": "off",
|
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
|
||||||
"@typescript-eslint/no-non-null-assertion": "off",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
1
pkgs/clan-app/ui-2d/eslint.config.mjs
Symbolic link
1
pkgs/clan-app/ui-2d/eslint.config.mjs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/eslint.config.mjs
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<!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
pkgs/clan-app/ui-2d/index.html
Symbolic link
1
pkgs/clan-app/ui-2d/index.html
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/index.html
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
1
pkgs/clan-app/ui-2d/postcss.config.js
Symbolic link
1
pkgs/clan-app/ui-2d/postcss.config.js
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/postcss.config.js
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/**
|
|
||||||
* @see https://prettier.io/docs/en/configuration.html
|
|
||||||
* @type {import("prettier").Config}
|
|
||||||
*/
|
|
||||||
const config = {
|
|
||||||
trailingComma: "all",
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
1
pkgs/clan-app/ui-2d/prettier.config.js
Symbolic link
1
pkgs/clan-app/ui-2d/prettier.config.js
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/prettier.config.js
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extends: ["stylelint-config-standard", "stylelint-config-tailwindcss"],
|
|
||||||
rules: {
|
|
||||||
// You can adjust rules here
|
|
||||||
},
|
|
||||||
};
|
|
||||||
1
pkgs/clan-app/ui-2d/stylelint.config.js
Symbolic link
1
pkgs/clan-app/ui-2d/stylelint.config.js
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/stylelint.config.js
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import typography from "@tailwindcss/typography";
|
|
||||||
import kobalte from "@kobalte/tailwindcss";
|
|
||||||
import core from "./tailwind/core-plugin";
|
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
const config = {
|
|
||||||
content: ["./src/**/*.{js,jsx,ts,tsx}"],
|
|
||||||
theme: {},
|
|
||||||
plugins: [typography, core, kobalte],
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
1
pkgs/clan-app/ui-2d/tailwind.config.ts
Symbolic link
1
pkgs/clan-app/ui-2d/tailwind.config.ts
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/tailwind.config.ts
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
export function isValidHostname(value: string | null | undefined) {
|
|
||||||
if (typeof value !== "string") return false;
|
|
||||||
|
|
||||||
const validHostnameChars = /^[a-zA-Z0-9-.]{1,253}\.?$/g;
|
|
||||||
|
|
||||||
if (!validHostnameChars.test(value)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value.endsWith(".")) {
|
|
||||||
value = value.slice(0, value.length - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value.length > 253) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const labels = value.split(".");
|
|
||||||
|
|
||||||
const isValid = labels.every(function (label) {
|
|
||||||
const validLabelChars = /^([a-zA-Z0-9-]+)$/g;
|
|
||||||
|
|
||||||
const validLabel =
|
|
||||||
validLabelChars.test(label) &&
|
|
||||||
label.length < 64 &&
|
|
||||||
!label.startsWith("-") &&
|
|
||||||
!label.endsWith("-");
|
|
||||||
|
|
||||||
return validLabel;
|
|
||||||
});
|
|
||||||
|
|
||||||
return isValid;
|
|
||||||
}
|
|
||||||
1
pkgs/clan-app/ui-2d/util.ts
Symbolic link
1
pkgs/clan-app/ui-2d/util.ts
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/util.ts
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
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, "./"), // Adjust the path as needed
|
|
||||||
},
|
|
||||||
},
|
|
||||||
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/vite.config.ts
Symbolic link
1
pkgs/clan-app/ui-2d/vite.config.ts
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../ui/vite.config.ts
|
||||||
Reference in New Issue
Block a user