barely-a-dev-server
Advanced tools
Comparing version 0.6.3 to 0.7.0
{ | ||
"name": "barely-a-dev-server", | ||
"version": "0.6.3", | ||
"version": "0.7.0", | ||
"type": "module", | ||
@@ -25,3 +25,3 @@ "description": "", | ||
"scripts": { | ||
"prepublish": "make clean && make test" | ||
"prepublishOnly": "make prepublishOnly" | ||
}, | ||
@@ -32,4 +32,4 @@ "files": [ | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.8.3" | ||
"@biomejs/biome": "^1.9.4" | ||
} | ||
} |
@@ -13,2 +13,6 @@ import { join } from "node:path"; | ||
); | ||
const entryPoints = [join(options.entryRoot, "**", "*.ts")]; | ||
if (options.bundleCSS) { | ||
entryPoints.push(join(options.entryRoot, "**", "*.css")); | ||
} | ||
const esbuildOptions = { | ||
@@ -23,3 +27,3 @@ target: "es2022", | ||
...options.esbuildOptions, | ||
entryPoints: [join(options.entryRoot, "**", "*.ts")], | ||
entryPoints, | ||
outdir: options.outDir, | ||
@@ -26,0 +30,0 @@ }; |
@@ -11,3 +11,4 @@ import type { BuildOptions } from "esbuild"; | ||
devDomain?: string; | ||
bundleCSS?: boolean; | ||
setHeaders?: (request: Request, response: Response) => Promise<void>; | ||
}): Promise<void>; |
@@ -11,3 +11,2 @@ import { cp, rm } from "node:fs/promises"; | ||
} | ||
options.debug ??= false; | ||
options.dev ??= true; | ||
@@ -17,3 +16,2 @@ options.esbuildOptions ??= {}; | ||
options.outDir ??= join(options.dev ? "dist/dev" : "dist", options.entryRoot); | ||
options.cors ??= false; | ||
@@ -20,0 +18,0 @@ // TODO: Is there a succinct way to clear the `outDir` contents without |
44023
142