Skip to content

Commit

Permalink
isolate config
Browse files Browse the repository at this point in the history
helps the build somehow
  • Loading branch information
digitaldesigndj committed Aug 16, 2023
1 parent 67be935 commit 4d6ba2a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion dev.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/

import dev from "$fresh/dev.ts"
import config from "@/fresh.config.ts"

await dev(import.meta.url, "./main.ts")
await dev(import.meta.url, "./main.ts", config)
9 changes: 9 additions & 0 deletions fresh.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "$fresh/server.ts"
import twindPlugin from "$fresh/plugins/twind.ts"
import twindConfig from "@/twind.config.ts"
import { PORT } from "@/utils/config.js"

export default defineConfig({
port: PORT,
plugins: [twindPlugin(twindConfig)],
})
13 changes: 3 additions & 10 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
/// <reference lib="deno.ns" />

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

import twindPlugin from "$fresh/plugins/twind.ts"
import twindConfig from "./twind.config.ts"

import { PORT } from "@/utils/config.js"

await start(manifest, {
port: PORT,
plugins: [twindPlugin(twindConfig)],
})
await start(manifest, config)

0 comments on commit 4d6ba2a

Please sign in to comment.