@dnax/core 0.2.1 → 0.2.3
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/bin/index.ts +7 -5
- package/package.json +1 -1
package/bin/index.ts
CHANGED
|
@@ -26,17 +26,19 @@ function runPkg(
|
|
|
26
26
|
// Écoutez le signal SIGINT (Ctrl + C)
|
|
27
27
|
process.on("SIGINT", () => {
|
|
28
28
|
if (exec?.kill) exec.kill();
|
|
29
|
-
process.exit(); // Terminez le processus principal
|
|
29
|
+
process.exit(1); // Terminez le processus principal
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
ch.watch(".", {
|
|
33
|
+
cwd: process.cwd(),
|
|
33
34
|
ignored: [
|
|
34
|
-
|
|
35
|
-
/.*\.(jpg|jpeg|png|gif|bmp|svg|webp)$/i,
|
|
35
|
+
/.*\.(jpg|jpeg|png|gif|bmp|svg|webp|dump|zip|rar|.git)$/i,
|
|
36
36
|
/node_modules|node_modules\/.*/,
|
|
37
37
|
/node_modules/,
|
|
38
38
|
/(^|[\/\\])\../,
|
|
39
39
|
"*/node_modules",
|
|
40
|
+
"node_modules",
|
|
41
|
+
"dist",
|
|
40
42
|
"*/dist",
|
|
41
43
|
"*.zip",
|
|
42
44
|
"*.tar",
|
|
@@ -50,9 +52,9 @@ ch.watch(".", {
|
|
|
50
52
|
],
|
|
51
53
|
})
|
|
52
54
|
.on("change", (path) => {
|
|
55
|
+
console.log(path);
|
|
53
56
|
let dev = process.argv.includes("--dev");
|
|
54
|
-
|
|
55
|
-
if (dev) {
|
|
57
|
+
if (dev && (path?.endsWith(".ts") || path?.endsWith(".js"))) {
|
|
56
58
|
s.start("Restarting due to changes ...");
|
|
57
59
|
if (exec?.kill) {
|
|
58
60
|
exec.kill();
|