swatchkit 0.6.0 → 0.6.1
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/build.js +10 -2
- package/package.json +1 -1
package/build.js
CHANGED
|
@@ -737,9 +737,17 @@ function watch(settings) {
|
|
|
737
737
|
}, 100); // 100ms debounce
|
|
738
738
|
};
|
|
739
739
|
|
|
740
|
-
// Watch source files for changes
|
|
740
|
+
// Watch source files for changes.
|
|
741
|
+
// Ignore the tokens UI directory inside swatchkitDir — the build generates
|
|
742
|
+
// HTML files there (swatchkit/tokens/*.html), which would retrigger the
|
|
743
|
+
// watcher and cause an infinite rebuild loop.
|
|
744
|
+
const tokensUiDir = path.join(settings.swatchkitDir, "tokens");
|
|
745
|
+
|
|
741
746
|
const sourceWatcher = chokidar.watch(sourcePaths, {
|
|
742
|
-
ignored:
|
|
747
|
+
ignored: [
|
|
748
|
+
/(^|[\/\\])\../, // ignore dotfiles
|
|
749
|
+
tokensUiDir, // ignore build-generated token HTML
|
|
750
|
+
],
|
|
743
751
|
persistent: true,
|
|
744
752
|
ignoreInitial: true,
|
|
745
753
|
});
|