Skip to content

Commit eb30fda

Browse files
feat: add --no-minify arg to build script (#48)
* feat: add --no-minify arg to build script Signed-off-by: Gordon Smith <[email protected]> * remove docs:build-dev command * remove comment --------- Signed-off-by: Gordon Smith <[email protected]> Co-authored-by: Gordon Smith <[email protected]>
1 parent 3c1341e commit eb30fda

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/build.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export default async function run(args?: string[]): Promise<void> {
2525
type: "string",
2626
default: "./"
2727
},
28+
minify: {
29+
type: "boolean",
30+
default: true
31+
},
2832
template: {
2933
type: "string"
3034
},
@@ -45,6 +49,7 @@ export default async function run(args?: string[]): Promise<void> {
4549
--template <path> path to the HTML template
4650
-o, --out <dir> path to the output directory (relative to root)
4751
--base <path> serving base path; defaults to ./
52+
--no-minify disable JS/CSS minification
4853
--empty whether to empty the output directory before building
4954
-h, --help show this message
5055
`);
@@ -57,6 +62,8 @@ export default async function run(args?: string[]): Promise<void> {
5762
root: values.root,
5863
base: values.base,
5964
build: {
65+
minify: values.minify ? "esbuild" : false,
66+
cssMinify: values.minify ? "esbuild" : false,
6067
outDir: values.out,
6168
emptyOutDir: values.empty,
6269
rollupOptions: {

0 commit comments

Comments
 (0)