mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-20 17:02:53 -04:00
cleanup and delete old scripts and configs (#536)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
_
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
@@ -1,23 +0,0 @@
|
||||
import type { StorybookConfig } from "@storybook/react-vite";
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ["../**/*.mdx", "../**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
||||
addons: [
|
||||
"@storybook/addon-links",
|
||||
"@storybook/addon-essentials",
|
||||
"@chromatic-com/storybook",
|
||||
"@storybook/addon-interactions",
|
||||
],
|
||||
framework: {
|
||||
name: "@storybook/react-vite",
|
||||
options: {
|
||||
builder: {
|
||||
viteConfigPath: "sb-vite.config.ts",
|
||||
},
|
||||
},
|
||||
},
|
||||
docs: {
|
||||
autodocs: "tag",
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
@@ -1,34 +0,0 @@
|
||||
const { createProxyMiddleware } = require("http-proxy-middleware");
|
||||
|
||||
module.exports = function expressMiddleware(router) {
|
||||
router.use(
|
||||
"/v1",
|
||||
createProxyMiddleware({
|
||||
target: "https://api.storyteller.ai/v1",
|
||||
changeOrigin: true,
|
||||
on: {
|
||||
proxyReq: async (req, res) => {
|
||||
req.setHeader("Access-Control-Allow-Origin", "*");
|
||||
req.setHeader("Origin", "http://localhost:5173");
|
||||
req.setHeader("Referer", "http://localhost:5173");
|
||||
},
|
||||
},
|
||||
logger: console,
|
||||
}),
|
||||
);
|
||||
router.use(
|
||||
"/cdn-cgi",
|
||||
createProxyMiddleware({
|
||||
target: "https://cdn.storyteller.ai/cdn-cgi",
|
||||
changeOrigin: true,
|
||||
on: {
|
||||
proxyReq: async (req, res) => {
|
||||
req.setHeader("Access-Control-Allow-Origin", "*");
|
||||
req.setHeader("Origin", "http://localhost:5173");
|
||||
req.setHeader("Referer", "http://localhost:5173");
|
||||
},
|
||||
},
|
||||
logger: console,
|
||||
}),
|
||||
);
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
|
||||
Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +0,0 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
@@ -1,23 +0,0 @@
|
||||
import type { Preview } from "@storybook/react";
|
||||
import "tailwindcss/tailwind.css";
|
||||
import "../app/styles/tailwind.css";
|
||||
import "../app/styles/normalize.css?url";
|
||||
import "../app//styles/tailwind.css?url";
|
||||
import "../app//styles/base.css?url";
|
||||
import { MemoryRouter } from "react-router";
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
},
|
||||
decorators: [
|
||||
(story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>,
|
||||
],
|
||||
};
|
||||
|
||||
export default preview;
|
||||
@@ -1,67 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -r entropy=$(xxd -l16 -ps /dev/urandom)
|
||||
|
||||
#declare -r CHROME_DIR="${HOME}/.chromeDevTemp"
|
||||
declare -r chrome_dir="/tmp/chrome/${entropy}"
|
||||
|
||||
# See flags available and documentation:
|
||||
# https://chromium.googlesource.com/chromium/src/+/HEAD/chrome/common/chrome_switches.cc
|
||||
# https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
|
||||
# https://peter.sh/experiments/chromium-command-line-switches/
|
||||
|
||||
# NB: Creating the directory first seems to block process start.
|
||||
# Perhaps this is the wrong chmod ownership flags.
|
||||
#mkdir -p $CHROME_DIR
|
||||
|
||||
#--auto-open-devtools-for-tabs="true" \
|
||||
#--devtools-flags="" \
|
||||
|
||||
# TODO(bt): Math to determine better window placement.
|
||||
|
||||
launch_linux() {
|
||||
chromium \
|
||||
--allow-running-insecure-content \
|
||||
--disable-features=ChromeLabs \
|
||||
--disable-site-isolation-trials \
|
||||
--disable-web-security \
|
||||
--ignore-certificate-errors \
|
||||
--install-autogenerated-theme="100,150,255" \
|
||||
--unsafely-treat-insecure-origin-as-secure="http://localhost:5173" \
|
||||
--user-data-dir="${chrome_dir}" \
|
||||
--window-position=1200,300 \
|
||||
--window-size=1500,1700 \
|
||||
http://localhost:5173/idealenigma
|
||||
}
|
||||
|
||||
launch_mac() {
|
||||
# See https://stackoverflow.com/a/58658101
|
||||
# NB: '7001' port is being chosen because something on the system is hogging port 7000.
|
||||
# chrome://flags/#unsafely-treat-insecure-origin-as-secure - allow microphone recording
|
||||
# otherwise getUserMedia() / navigator.mediaDevices will not function
|
||||
# --guest: no Google login screen
|
||||
open -na "Google Chrome" --args \
|
||||
--disable-features=ChromeLabs \
|
||||
--disable-site-isolation-trials \
|
||||
--disable-web-security \
|
||||
--ignore-certificate-errors \
|
||||
--install-autogenerated-theme="100,150,255" \
|
||||
--unsafely-treat-insecure-origin-as-secure="http://localhost:5173" \
|
||||
--user-data-dir="${chrome_dir}" \
|
||||
--window-position=1200,300 \
|
||||
--window-size=1500,1700 \
|
||||
--guest \
|
||||
http://localhost:5173/idealenigma
|
||||
}
|
||||
|
||||
case $OSTYPE in
|
||||
linux*)
|
||||
launch_linux
|
||||
;;
|
||||
darwin*)
|
||||
launch_mac
|
||||
;;
|
||||
*)
|
||||
echo "Unknown OS"
|
||||
;;
|
||||
esac
|
||||
@@ -27,11 +27,11 @@ launch_linux() {
|
||||
--disable-web-security \
|
||||
--ignore-certificate-errors \
|
||||
--install-autogenerated-theme="100,150,255" \
|
||||
--unsafely-treat-insecure-origin-as-secure="http://devproxy.fakeyou.com:7000" \
|
||||
--unsafely-treat-insecure-origin-as-secure="http://localhost:5173" \
|
||||
--user-data-dir="${chrome_dir}" \
|
||||
--window-position=1200,300 \
|
||||
--window-size=1500,1700 \
|
||||
http://devproxy.fakeyou.com:7000
|
||||
http://localhost:5173
|
||||
}
|
||||
|
||||
launch_mac() {
|
||||
@@ -46,12 +46,12 @@ launch_mac() {
|
||||
--disable-web-security \
|
||||
--ignore-certificate-errors \
|
||||
--install-autogenerated-theme="100,150,255" \
|
||||
--unsafely-treat-insecure-origin-as-secure="http://devproxy.fakeyou.com:7001" \
|
||||
--unsafely-treat-insecure-origin-as-secure="http://localhost:5173" \
|
||||
--user-data-dir="${chrome_dir}" \
|
||||
--window-position=1200,300 \
|
||||
--window-size=1500,1700 \
|
||||
--guest \
|
||||
http://devproxy.fakeyou.com:7001
|
||||
http://localhost:5173
|
||||
}
|
||||
|
||||
case $OSTYPE in
|
||||
|
||||
Reference in New Issue
Block a user