@sleekcms/sync 1.1.0 → 1.2.0
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/dist/AGENT.md +1 -1
- package/dist/setup-site.js +3 -0
- package/dist/watcher.js +1 -0
- package/package.json +1 -1
package/dist/AGENT.md
CHANGED
|
@@ -44,7 +44,7 @@ Examples:
|
|
|
44
44
|
/pages/<key>.ejs Page templates
|
|
45
45
|
/entries/<key>.ejs Entry templates
|
|
46
46
|
/blocks/<key>.ejs Block templates
|
|
47
|
-
/layouts/<name>.ejs Layout wrappers
|
|
47
|
+
/layouts/<name>.ejs Layout wrappers (default is common.ejs)
|
|
48
48
|
|
|
49
49
|
/css/<name>.css Stylesheets (require head injection)
|
|
50
50
|
/css/tailwind.css Tailwind CSS (auto-compiled, auto-injected)
|
package/dist/setup-site.js
CHANGED
|
@@ -120,6 +120,7 @@ async function syncSite(opts) {
|
|
|
120
120
|
await fs_extra_1.default.outputJson(statePath, { fileMap }, { spaces: 2 });
|
|
121
121
|
return { viewsDir, site, isFirstRun, pushed, pulled };
|
|
122
122
|
}
|
|
123
|
+
const IGNORED_FILENAMES = new Set([".DS_Store", "Thumbs.db", "desktop.ini"]);
|
|
123
124
|
async function walkFiles(viewsDir) {
|
|
124
125
|
const sourceRoot = path_1.default.join(viewsDir, "src");
|
|
125
126
|
if (!(await fs_extra_1.default.pathExists(sourceRoot)))
|
|
@@ -128,6 +129,8 @@ async function walkFiles(viewsDir) {
|
|
|
128
129
|
async function walk(dir) {
|
|
129
130
|
const entries = await fs_extra_1.default.readdir(dir, { withFileTypes: true });
|
|
130
131
|
for (const entry of entries) {
|
|
132
|
+
if (IGNORED_FILENAMES.has(entry.name))
|
|
133
|
+
continue;
|
|
131
134
|
const full = path_1.default.join(dir, entry.name);
|
|
132
135
|
if (entry.isDirectory())
|
|
133
136
|
await walk(full);
|
package/dist/watcher.js
CHANGED
|
@@ -74,6 +74,7 @@ function monitorFiles() {
|
|
|
74
74
|
watcher = chokidar_1.default.watch(watchTargets(viewsDir), {
|
|
75
75
|
persistent: true,
|
|
76
76
|
ignoreInitial: true,
|
|
77
|
+
ignored: /(^|[/\\])(\.DS_Store|Thumbs\.db|desktop\.ini)$/,
|
|
77
78
|
})
|
|
78
79
|
.on("change", () => { scheduleSync(); })
|
|
79
80
|
.on("add", () => { scheduleSync(); })
|