@hackwaly/task 0.3.11 → 0.3.12

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/package.json +1 -1
  2. package/src/cli.js +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackwaly/task",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/cli.js CHANGED
@@ -47,7 +47,20 @@ export async function cliMain() {
47
47
  }
48
48
  const watcher = chokidar.watch([...watchTargets], {
49
49
  ignoreInitial: true,
50
- ignored: (path) => /\bnode_modules\b/.test(path),
50
+ ignored: (path, stats) => {
51
+ if (/\bnode_modules\b/.test(path) || !micromatch.isMatch(path, "**/*", { dot: false })) {
52
+ return true;
53
+ }
54
+ if (stats !== undefined && stats.isFile()) {
55
+ for (const task of watchSet) {
56
+ const relPath = NodePath.relative(task.meta.cwd, path);
57
+ if (!micromatch.isMatch(relPath, task.meta.inputs)) {
58
+ return true;
59
+ }
60
+ }
61
+ }
62
+ return false;
63
+ },
51
64
  });
52
65
  const dirtySeedSet = new Set();
53
66
  const flush = () => {