From 578aebcae150eba56cd5bc7519e48b73de39999c Mon Sep 17 00:00:00 2001 From: rhpidfyre Date: Tue, 18 Feb 2025 17:31:56 -0500 Subject: [PATCH] init the docker file for later user https://github.com/static-web-server/static-web-server --- Dockerfile | 10 +++++----- astro.config.mjs | 12 +----------- src/components/client/shell/history.ts | 15 +++++++++++++++ tsconfig.json | 13 +++---------- 4 files changed, 24 insertions(+), 26 deletions(-) create mode 100644 src/components/client/shell/history.ts diff --git a/Dockerfile b/Dockerfile index f696c5f..8055890 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM oven/bun +FROM oven/bun AS build -COPY package.json . -COPY astro.config.mjs . -COPY src/ . -COPY public/ . +COPY package.json astro.config.mjs /tmp/ +COPY src public /tmp/ + +RUN bun run build diff --git a/astro.config.mjs b/astro.config.mjs index 3070a6a..38a4f2d 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,15 +1,5 @@ // @ts-check import { defineConfig } from 'astro/config'; -import react from '@astrojs/react'; - // https://astro.build/config -export default defineConfig({ - integrations: [react({ - babel: { - plugins: [ - ["babel-plugin-react-compiler"] - ] - } - })] -}); \ No newline at end of file +export default defineConfig({}); \ No newline at end of file diff --git a/src/components/client/shell/history.ts b/src/components/client/shell/history.ts new file mode 100644 index 0000000..d3f1863 --- /dev/null +++ b/src/components/client/shell/history.ts @@ -0,0 +1,15 @@ +const history_list: string[] = [] + +interface History { + add: (cmd: string) => void +} +const history = {} as History + +history.add = function(cmd: string) { + if (history_list[history_list.length-1] !== cmd) { + history_list.push(cmd) + } +} + +export default history +export { history_list } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 5b3089e..07bf590 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,8 @@ { "extends": "astro/tsconfigs/strict", - "include": [ - ".astro/types.d.ts", - "**/*" - ], - "exclude": [ - "dist" - ], + "include": [".astro/types.d.ts", "**/*"], + "exclude": ["dist"], "compilerOptions": { - "noImplicitAny": true, - "jsx": "react-jsx", - "jsxImportSource": "react" + "noImplicitAny": true } } \ No newline at end of file