Skip to content

Commit

Permalink
update Fresh and Deno
Browse files Browse the repository at this point in the history
Signed-off-by: Twilight Sparkle <[email protected]>
  • Loading branch information
Twi committed Nov 22, 2023
1 parent abd2e28 commit 23f99e2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

# Fresh build directory
_fresh/
_fresh
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ WORKDIR /app
ARG GIT_REVISION
ENV DENO_DEPLOYMENT_ID=${GIT_REVISION}

USER deno

COPY . .
RUN deno cache --reload main.ts
RUN ls -la && deno task build
ENV NODE_ENV=production
ENV HOME=/deno-dir/location_data/.home

Expand Down
5 changes: 3 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"tasks": {
"start": "deno run --unstable -A --watch=static/,routes/ dev.ts",
"update": "deno run -A -r https://fresh.deno.dev/update .",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts"
"build": "deno run --unstable -A dev.ts build",
"preview": "deno run --unstable -A main.ts",
"deploy": "~/.fly/bin/fly deploy"
},
"lock": false,
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
Expand Down
8 changes: 8 additions & 0 deletions fresh.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "$fresh/server.ts";

import freshwind from "@freshwind";
import config, { configURL } from "./twind.config.ts";

export default defineConfig({
plugins: [freshwind(config, configURL)],
});
8 changes: 2 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ import "std/dotenv/load.ts";

import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";

import freshwind from "@freshwind";
import config, { configURL } from "./twind.config.ts";
import config from "./fresh.config.ts";

import * as comrak from "@comrak";
await comrak.init();

await start(manifest, {
plugins: [freshwind(config, configURL)],
});
await start(manifest, config);

0 comments on commit 23f99e2

Please sign in to comment.