init the docker file for later user
https://github.com/static-web-server/static-web-server
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
FROM oven/bun
|
FROM oven/bun AS build
|
||||||
|
|
||||||
COPY package.json .
|
COPY package.json astro.config.mjs /tmp/
|
||||||
COPY astro.config.mjs .
|
COPY src public /tmp/
|
||||||
COPY src/ .
|
|
||||||
COPY public/ .
|
RUN bun run build
|
||||||
|
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
import react from '@astrojs/react';
|
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({});
|
||||||
integrations: [react({
|
|
||||||
babel: {
|
|
||||||
plugins: [
|
|
||||||
["babel-plugin-react-compiler"]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})]
|
|
||||||
});
|
|
15
src/components/client/shell/history.ts
Normal file
15
src/components/client/shell/history.ts
Normal file
@ -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 }
|
@ -1,15 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"include": [
|
"include": [".astro/types.d.ts", "**/*"],
|
||||||
".astro/types.d.ts",
|
"exclude": ["dist"],
|
||||||
"**/*"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true
|
||||||
"jsx": "react-jsx",
|
|
||||||
"jsxImportSource": "react"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user