Skip to content

Commit 4cf7c24

Browse files
style(Worker): Expand newlines in ESBuild configurations and tsconfig
Insert blank newlines in the ESBuild configuration files and tsconfig to improve readability. The changes are scoped to the Worker element's build pipeline configuration. This change enhances maintainability of the Worker element's build process by improving the formatting of configuration files without altering build behavior.
1 parent 4f7e59c commit 4cf7c24

4 files changed

Lines changed: 63 additions & 13 deletions

File tree

Configuration/ESBuild/Target.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Configuration/ESBuild/Worker.js

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Configuration/ESBuild/Worker.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,52 @@
11
export const On = process.env["NODE_ENV"] === "development" ||
22
process.env["TAURI_ENV_DEBUG"] === "true";
3+
34
export const Clean = process.env["Clean"] === "true";
5+
46
/**
57
* @module ESBuild
68
*
79
*/
810
export default {
11+
912
color: true,
13+
1014
format: "esm",
15+
1116
logLevel: "debug",
17+
1218
metafile: true,
19+
1320
minify: !On,
21+
1422
outdir: "Configuration",
23+
1524
platform: "node",
25+
1626
target: "esnext",
27+
1728
tsconfig: "tsconfig.json",
29+
1830
write: true,
31+
1932
legalComments: On ? "inline" : "none",
33+
2034
bundle: false,
35+
2136
assetNames: "Asset/[name]-[hash]",
37+
2238
sourcemap: On,
39+
2340
drop: On ? [] : ["debugger"],
41+
2442
ignoreAnnotations: !On,
43+
2544
keepNames: On,
45+
2646
plugins: [
2747
{
2848
name: "Target",
49+
2950
// @ts-ignore
3051
setup({ onStart, initialOptions: { outdir } }) {
3152
switch (true) {
@@ -36,19 +57,25 @@ export default {
3657
? await (await import("node:fs/promises")).rm(outdir, {
3758
recursive: true,
3859
})
60+
3961
: {};
4062
}
63+
4164
catch (_Error) {
4265
console.log(_Error);
4366
}
4467
});
68+
4569
break;
70+
4671
default:
4772
break;
4873
}
4974
},
5075
},
5176
],
77+
5278
outbase: "Source/Configuration",
5379
};
80+
5481
export const { sep, posix } = await import("node:path");

tsconfig.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,14 @@
44
"baseUrl": "./",
55
"declarationMap": true,
66
"emitDeclarationOnly": true,
7-
"lib": [
8-
"DOM",
9-
"ESNext",
10-
"WebWorker"
11-
],
7+
"lib": ["DOM", "ESNext", "WebWorker"],
128
"module": "ESNext",
139
"moduleResolution": "Bundler",
1410
"outDir": "Target",
1511
"rootDir": "./Source",
1612
"target": "ESNext"
1713
},
18-
"exclude": [
19-
"Target",
20-
"node_modules"
21-
],
14+
"exclude": ["Target", "node_modules"],
2215
"extends": "@playform/build/tsconfig",
23-
"include": [
24-
"Source",
25-
"@types/serviceworker"
26-
]
16+
"include": ["Source", "@types/serviceworker"]
2717
}

0 commit comments

Comments
 (0)