diff options
| author | Fuwn <[email protected]> | 2023-08-30 14:53:27 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-30 14:53:27 -0700 |
| commit | 2c6b9c2091ff76f07a6dbc4cd2c7d14298f3c9f5 (patch) | |
| tree | f111a2a5c86d4e7627a4bb068571152ee51487f5 | |
| parent | revert(docker): builder image as node (diff) | |
| download | due.moe-2c6b9c2091ff76f07a6dbc4cd2c7d14298f3c9f5.tar.xz due.moe-2c6b9c2091ff76f07a6dbc4cd2c7d14298f3c9f5.zip | |
ci(docker): use bun through and through
| -rw-r--r-- | Dockerfile | 12 | ||||
| -rwxr-xr-x | bun.lockb | bin | 82786 -> 83144 bytes | |||
| -rw-r--r-- | package.json | 65 | ||||
| -rw-r--r-- | svelte.config.js | 9 |
4 files changed, 46 insertions, 40 deletions
@@ -1,21 +1,21 @@ -FROM node:18.16-alpine as build +FROM oven/bun as build WORKDIR /due COPY package.json ./ -RUN yarn install +RUN bun install COPY ./ ./ -RUN yarn run build +RUN bun run build -FROM node:18.16-alpine +FROM oven/bun WORKDIR /due COPY --from=build /due . -EXPOSE 4173 +EXPOSE 3000 -CMD ["yarn", "run", "preview", "--", "--host", "0.0.0.0"]
\ No newline at end of file +CMD ["bun", "./build/index.js"]
\ No newline at end of file Binary files differdiff --git a/package.json b/package.json index c7fa6c3a..ce097e10 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,35 @@ { - "name": "due.moe", - "version": "0.0.0", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/kit": "^1.20.4", - "@typescript-eslint/eslint-plugin": "^5.45.0", - "@typescript-eslint/parser": "^5.45.0", - "eslint": "^8.28.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-svelte": "^2.30.0", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.10.1", - "svelte": "^4.0.5", - "svelte-check": "^3.4.3", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "^4.4.2" - }, - "type": "module", - "dependencies": { - "dexie": "^4.0.1-alpha.25" - } + "name": "due.moe", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^2.0.0", + "@sveltejs/kit": "^1.20.4", + "@typescript-eslint/eslint-plugin": "^5.45.0", + "@typescript-eslint/parser": "^5.45.0", + "eslint": "^8.28.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-svelte": "^2.30.0", + "prettier": "^2.8.0", + "prettier-plugin-svelte": "^2.10.1", + "svelte": "^4.0.5", + "svelte-adapter-bun": "^0.5.0", + "svelte-check": "^3.4.3", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^4.4.2" + }, + "type": "module", + "dependencies": { + "dexie": "^4.0.1-alpha.25" + } } diff --git a/svelte.config.js b/svelte.config.js index 1cf26a00..28de0ccd 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from '@sveltejs/adapter-auto'; +import adapter from 'svelte-adapter-bun'; import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ @@ -11,7 +11,12 @@ const config = { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // If your environment is not supported or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() + adapter: adapter({ + precompress: { + brotli: true, + gzip: true, + }, + }) } }; |