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 54e8507 commit ece50bfCopy full SHA for ece50bf
main.js
@@ -51,7 +51,16 @@ const sliceDocumentsFromJazzyArgs = (outputArg) => {
51
52
const getDocumentationFolder = () => {
53
if (configFilePath) {
54
- const config = yaml.safeLoad(fs.readFileSync(configFilePath, "utf8"))
+ let config
55
+ const fileExt = configFilePath.split(".").pop().toLowerCase()
56
+
57
+ if (fileExt === "yml" || fileExt === "yaml") {
58
+ config = yaml.safeLoad(fs.readFileSync(configFilePath, "utf8"))
59
+ } else if (fileExt === "json") {
60
+ const rawData = fs.readFileSync(configFilePath)
61
+ config = JSON.parse(rawData)
62
+ }
63
64
if (config.output) {
65
return config.output
66
}
0 commit comments