refactor: move dev assets builds output
This commit is contained in:
parent
e2d00b489c
commit
03fa94abdc
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,3 +9,6 @@
|
|||
_fresh/
|
||||
# npm dependencies
|
||||
node_modules/
|
||||
|
||||
# Dev assets builds
|
||||
static/dev
|
8
build.ts
8
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)
|
||||
|
|
Loading…
Reference in a new issue