@dnax/core 0.2.2 → 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.
Files changed (2) hide show
  1. package/bin/index.ts +5 -7
  2. package/package.json +1 -1
package/bin/index.ts CHANGED
@@ -26,21 +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
33
  cwd: process.cwd(),
34
34
  ignored: [
35
- // "**/*",
36
- "!**/*.ts",
37
- "!**/*.js",
38
- "!**/*.env",
39
35
  /.*\.(jpg|jpeg|png|gif|bmp|svg|webp|dump|zip|rar|.git)$/i,
40
36
  /node_modules|node_modules\/.*/,
41
37
  /node_modules/,
42
38
  /(^|[\/\\])\../,
43
39
  "*/node_modules",
40
+ "node_modules",
41
+ "dist",
44
42
  "*/dist",
45
43
  "*.zip",
46
44
  "*.tar",
@@ -54,9 +52,9 @@ ch.watch(".", {
54
52
  ],
55
53
  })
56
54
  .on("change", (path) => {
55
+ console.log(path);
57
56
  let dev = process.argv.includes("--dev");
58
-
59
- if (dev) {
57
+ if (dev && (path?.endsWith(".ts") || path?.endsWith(".js"))) {
60
58
  s.start("Restarting due to changes ...");
61
59
  if (exec?.kill) {
62
60
  exec.kill();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {