diff --git a/bin/build.ts b/bin/build.ts index 0b5fb4e..d6d40aa 100755 --- a/bin/build.ts +++ b/bin/build.ts @@ -25,6 +25,10 @@ export default async function run(args?: string[]): Promise { type: "string", default: "./" }, + minify: { + type: "boolean", + default: true + }, template: { type: "string" }, @@ -45,6 +49,7 @@ export default async function run(args?: string[]): Promise { --template path to the HTML template -o, --out path to the output directory (relative to root) --base serving base path; defaults to ./ + --no-minify disable JS/CSS minification --empty whether to empty the output directory before building -h, --help show this message `); @@ -57,6 +62,8 @@ export default async function run(args?: string[]): Promise { root: values.root, base: values.base, build: { + minify: values.minify ? "esbuild" : false, + cssMinify: values.minify ? "esbuild" : false, outDir: values.out, emptyOutDir: values.empty, rollupOptions: {