From e8bbf98495fe54bdd6a71fdb405abaf3e250c16c Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 27 Jun 2024 21:30:54 +0200 Subject: [PATCH] feat: switch to node runtime --- .env.example | 1 + astro.config.mjs | 7 ++++--- package.json | 9 +++++++-- pnpm-lock.yaml | 14 ++++++-------- 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..89ca369 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +TURNSTILE_SECRET= diff --git a/astro.config.mjs b/astro.config.mjs index 47f9084..e9d455d 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,14 +2,15 @@ import {defineConfig, envField} from 'astro/config' import tailwind from '@astrojs/tailwind' import markdoc from '@astrojs/markdoc' -import cloudflare from '@astrojs/cloudflare' -// import node from '@astrojs/node' +import node from '@astrojs/node' // https://astro.build/config export default defineConfig({ output: 'hybrid', integrations: [tailwind(), markdoc()], - adapter: cloudflare(), + adapter: node({ + mode: 'standalone', + }), experimental: { env: { schema: { diff --git a/package.json b/package.json index dead26a..8060ce0 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,11 @@ "scripts": { "dev": "astro dev", "start": "astro dev", - "build": "astro check && astro build", + "build": "astro build", "preview": "astro preview", - "astro": "astro" + "astro": "astro", + "lint": "astro check --root ./src", + "serve-dist": "node ./dist/server/entry.mjs" }, "dependencies": { "@astrojs/check": "^0.7.0", @@ -23,5 +25,8 @@ "astro": "^4.10.3", "tailwindcss": "^3.4.4", "typescript": "^5.4.5" + }, + "devDependencies": { + "sharp": "^0.33.4" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84598d4..4c147f1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,10 @@ importers: typescript: specifier: ^5.4.5 version: 5.4.5 + devDependencies: + sharp: + specifier: ^0.33.4 + version: 0.33.4 packages: @@ -4178,13 +4182,11 @@ snapshots: dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 - optional: true color@4.2.3: dependencies: color-convert: 2.0.1 color-string: 1.9.1 - optional: true comma-separated-tokens@2.0.3: {} @@ -4232,8 +4234,7 @@ snapshots: destroy@1.2.0: {} - detect-libc@2.0.3: - optional: true + detect-libc@2.0.3: {} deterministic-object-hash@2.0.2: dependencies: @@ -4656,8 +4657,7 @@ snapshots: inherits@2.0.4: {} - is-arrayish@0.3.2: - optional: true + is-arrayish@0.3.2: {} is-binary-path@2.1.0: dependencies: @@ -5562,7 +5562,6 @@ snapshots: '@img/sharp-wasm32': 0.33.4 '@img/sharp-win32-ia32': 0.33.4 '@img/sharp-win32-x64': 0.33.4 - optional: true shebang-command@2.0.0: dependencies: @@ -5581,7 +5580,6 @@ snapshots: simple-swizzle@0.2.2: dependencies: is-arrayish: 0.3.2 - optional: true sisteransi@1.0.5: {}