@zpress/cli 0.4.0 → 0.4.2
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/145.mjs +10 -3
- package/package.json +3 -3
package/dist/145.mjs
CHANGED
|
@@ -587,9 +587,11 @@ const diffCommand = command({
|
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
589
|
function collectWatchPaths(config) {
|
|
590
|
-
const dirs = flattenIncludePaths(config.sections);
|
|
590
|
+
const dirs = flattenIncludePaths(config.sections).map(toDirectory);
|
|
591
|
+
const roots = dirs.map(toTopLevelRoot).filter((r)=>r.length > 0);
|
|
591
592
|
return uniq([
|
|
592
|
-
...dirs
|
|
593
|
+
...dirs,
|
|
594
|
+
...roots,
|
|
593
595
|
...CONFIG_GLOBS
|
|
594
596
|
]);
|
|
595
597
|
}
|
|
@@ -615,6 +617,11 @@ function toDirectory(from) {
|
|
|
615
617
|
}
|
|
616
618
|
return from;
|
|
617
619
|
}
|
|
620
|
+
function toTopLevelRoot(dir) {
|
|
621
|
+
const idx = dir.indexOf('/');
|
|
622
|
+
if (-1 === idx) return '';
|
|
623
|
+
return dir.slice(0, idx + 1);
|
|
624
|
+
}
|
|
618
625
|
const RENAME_SEPARATOR = ' -> ';
|
|
619
626
|
function gitChangedFiles(params) {
|
|
620
627
|
const [err, output] = execSilent({
|
|
@@ -1012,7 +1019,7 @@ const syncCommand = command({
|
|
|
1012
1019
|
});
|
|
1013
1020
|
await cli({
|
|
1014
1021
|
name: 'zpress',
|
|
1015
|
-
version: "0.4.
|
|
1022
|
+
version: "0.4.2",
|
|
1016
1023
|
description: 'CLI for building and serving documentation',
|
|
1017
1024
|
commands: {
|
|
1018
1025
|
sync: syncCommand,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zpress/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "CLI for building and serving zpress documentation sites",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"get-port": "^7.1.0",
|
|
41
41
|
"ts-pattern": "^5.9.0",
|
|
42
42
|
"zod": "^4.3.6",
|
|
43
|
-
"@zpress/core": "0.7.
|
|
43
|
+
"@zpress/core": "0.7.2",
|
|
44
44
|
"@zpress/templates": "0.1.1",
|
|
45
|
-
"@zpress/ui": "0.8.
|
|
45
|
+
"@zpress/ui": "0.8.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@rslib/core": "^0.20.0",
|