jeasx 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +7 -3
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -34,22 +34,26 @@ async function start() {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
async function build() {
|
|
37
|
-
|
|
37
|
+
const argv = [...process.argv];
|
|
38
|
+
process.argv = [];
|
|
38
39
|
await clean();
|
|
39
40
|
await import("./esbuild.config.js");
|
|
41
|
+
process.argv = argv;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
async function dev() {
|
|
43
45
|
process.env.NODE_ENV = "development";
|
|
46
|
+
// Run build to prepare browser assets for fastify-static
|
|
47
|
+
await build();
|
|
48
|
+
// Start the dev environment
|
|
44
49
|
process.argv[2] = "start";
|
|
45
50
|
process.argv[3] ??= "node_modules/jeasx/ecosystem.config.cjs";
|
|
46
|
-
await clean();
|
|
47
51
|
// @ts-ignore
|
|
48
52
|
await import("pm2/bin/pm2-runtime");
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
async function clean() {
|
|
52
|
-
await fs.rm("dist", { recursive: true, force: true });
|
|
56
|
+
await fs.rm("dist", { recursive: true, force: true, maxRetries: 3 });
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
export {};
|