From 03fa94abdc79dd76825367c39484708fe38aa9af Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Mon, 15 Jan 2024 10:43:48 +0100 Subject: [PATCH] refactor: move dev assets builds output --- .gitignore | 3 +++ build.ts | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5b4bdef..e93eac7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ _fresh/ # npm dependencies node_modules/ + +# Dev assets builds +static/dev \ No newline at end of file diff --git a/build.ts b/build.ts index da4564f..a918d13 100644 --- a/build.ts +++ b/build.ts @@ -3,7 +3,7 @@ import { ensureDir } from '$std/fs/mod.ts' import { parse, resolve } from '$std/path/mod.ts' console.log('building styles starts') -await ensureDir('_fresh/static') +await ensureDir('_fresh') try { //prevent Deno from exiting before bundle @@ -42,12 +42,12 @@ try { }) await Deno.writeTextFile( - './static/styles.css', + './static/dev/styles.css', new TextDecoder().decode(code), ) await Deno.writeTextFile( - './static/styles.map.css', - new TextDecoder().decode(map!), + './static/dev/styles.map.css', + new TextDecoder().decode(map ?? new Uint8Array()), ) } catch (error) { console.error(error)