markdown_link_checker_sc 0.0.135 → 0.0.136
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/index.js +10 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -36,9 +36,10 @@ program
|
|
|
36
36
|
)
|
|
37
37
|
.option(
|
|
38
38
|
"-d, --directory [directory]",
|
|
39
|
-
"A subfolder or the root to search for markdown and html files. Such as: `en` for an English subfolder. Default empty (same as -r directory)",
|
|
39
|
+
"A subfolder or the docs root to search for markdown and html files. Such as: `en` for an English subfolder. Default empty (same as -r directory)",
|
|
40
40
|
""
|
|
41
41
|
)
|
|
42
|
+
|
|
42
43
|
.option(
|
|
43
44
|
"-i, --imagedir [directory]",
|
|
44
45
|
"The directory to search for all image files for global orphan checking, relative to root - such as: `assets` or `en`. Default empty if not explicitly set, and global orphan checking will not be done",
|
|
@@ -60,10 +61,14 @@ program
|
|
|
60
61
|
)
|
|
61
62
|
.option(
|
|
62
63
|
"-f, --files <path>",
|
|
63
|
-
"JSON file with array of files to report on (default is all files).
|
|
64
|
+
"JSON file with array of files to report on (default is all files). JSON paths are usually relative to git root. Resolved to absolute file paths using `-g`.",
|
|
65
|
+
""
|
|
66
|
+
)
|
|
67
|
+
.option(
|
|
68
|
+
"-g, --repo [directory]",
|
|
69
|
+
"Repo root directory. Files in -f JSON are resolved to absolute paths relative to this dir. Defaults to current directory.)",
|
|
64
70
|
""
|
|
65
71
|
)
|
|
66
|
-
|
|
67
72
|
.option(
|
|
68
73
|
"-s, --toc [value]",
|
|
69
74
|
"full filename of TOC/Summary file in file system. If not specified, inferred from file with most links to other files"
|
|
@@ -115,7 +120,7 @@ async function loadJSONFileToReportOn(filePath) {
|
|
|
115
120
|
let filesArray = JSON.parse(fileContent);
|
|
116
121
|
// Array relative to root, so update to have full path
|
|
117
122
|
filesArray = filesArray.map((str) =>
|
|
118
|
-
path.join(sharedData.options.
|
|
123
|
+
path.join(sharedData.options.repo, str)
|
|
119
124
|
);
|
|
120
125
|
|
|
121
126
|
sharedData.options.log.includes("quick")
|
|
@@ -125,7 +130,7 @@ async function loadJSONFileToReportOn(filePath) {
|
|
|
125
130
|
return filesArray;
|
|
126
131
|
} catch (error) {
|
|
127
132
|
console.error(`Error reading file: ${error.message}`);
|
|
128
|
-
console.log(`Error reading file: ${error.message}`);
|
|
133
|
+
//console.log(`Error reading file: ${error.message}`);
|
|
129
134
|
process.exit(1);
|
|
130
135
|
}
|
|
131
136
|
}
|