We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3627bf2 commit adc307fCopy full SHA for adc307f
src/scripts/markdown-checker.js
@@ -1,7 +1,9 @@
1
const fs = require("fs")
2
const path = require("path")
3
const matter = require("gray-matter")
4
+const argv = require("minimist")(process.argv.slice(2))
5
6
+const LANG_ARG = argv.lang || null
7
const PATH_TO_INTL_MARKDOWN = "./src/content/translations/"
8
const PATH_TO_ALL_CONTENT = "./src/content/"
9
const TUTORIAL_DATE_REGEX = new RegExp("\\d{4}-\\d{2}-\\d{2}")
@@ -72,7 +74,13 @@ function sortMarkdownPathsIntoLanguages(files) {
72
74
? file.slice(langIndex, langIndex + charactersToSlice)
73
75
: "en"
76
- languages[lang].push(file)
77
+ if (LANG_ARG) {
78
+ if (LANG_ARG === lang) {
79
+ languages[lang].push(file)
80
+ }
81
+ } else {
82
83
84
}
85
86
return languages
0 commit comments