@anyblades/buildawesome-kit 1.3.0-alpha.2 → 1.3.0-alpha.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/buildawesome.config.js +7 -6
- package/package.json +1 -1
package/buildawesome.config.js
CHANGED
|
@@ -26,12 +26,13 @@ export default async function ($config, pluginOptions = {}) {
|
|
|
26
26
|
/* Dirs */
|
|
27
27
|
const inputDir = $config.directories.input;
|
|
28
28
|
const outputDir = $config.directories.output;
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
const _cwd = path.basename(process.cwd());
|
|
30
|
+
const cwdDotDir = _cwd.startsWith(".") ? _cwd : undefined;
|
|
31
|
+
if (cwdDotDir) {
|
|
31
32
|
// Per https://www.11ty.dev/docs/config/#directory-for-includes
|
|
32
33
|
// Order matters, put this at the top of your configuration file.
|
|
33
34
|
// This is relative to your input directory!
|
|
34
|
-
$config.setIncludesDirectory(
|
|
35
|
+
$config.setIncludesDirectory(`${cwdDotDir}/_includes/`);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/* Plugins */
|
|
@@ -133,9 +134,9 @@ export default async function ($config, pluginOptions = {}) {
|
|
|
133
134
|
});
|
|
134
135
|
// Dev tools
|
|
135
136
|
$config.setChokidarConfig({ followSymlinks: true }); // follow symlinks in Chokidar used by 11ty to watch files
|
|
136
|
-
if (
|
|
137
|
-
$config.watchIgnores.add(
|
|
138
|
-
$config.watchIgnores.add(
|
|
137
|
+
if (cwdDotDir) {
|
|
138
|
+
$config.watchIgnores.add(`../${cwdDotDir}/${outputDir}`); // !!! avoid circular watching
|
|
139
|
+
$config.watchIgnores.add(`../${cwdDotDir}/node_modules/`); // avoid performance issues
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
//```
|