Skip to content

Commit dc1ab55

Browse files
authored
Merge pull request #128 from ember-learn/add-spaces-2
fix: improve output of available versions
2 parents 6b2d4b9 + 5a6a62f commit dc1ab55

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

main.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,7 @@ async function transformProjectsDeep(projects, docs) {
7979
return built
8080
}
8181

82-
export async function apiDocsProcessor(
83-
projects,
84-
specificDocsVersion,
85-
runClean,
86-
) {
82+
export async function apiDocsProcessor(projects, specificDocsVersion, runClean) {
8783
let filesToProcess = projects.map(project => {
8884
return `${docsPath}/s3-docs/v${specificDocsVersion}/${project}-docs.json`
8985
})
@@ -107,7 +103,7 @@ export async function apiDocsProcessor(
107103
availableVersions.push(id.replace(`${project}-`, ''))
108104
)
109105
console.log({ project, availableVersions })
110-
fs.writeJsonSync(projRevFile, projRevFileContent)
106+
fs.writeJsonSync(projRevFile, projRevFileContent, { spaces: 2 })
111107
})
112108
)
113109
.then(() => {
@@ -124,7 +120,6 @@ function mergeById(arr1, arr2) {
124120
if (i < arr1.length && !seen.has(arr1[i].id)) {
125121
result.push(arr1[i])
126122
seen.add(arr1[i].id)
127-
128123
}
129124
if (i < arr2.length && !seen.has(arr2[i].id)) {
130125
result.push(arr2[i])

0 commit comments

Comments
 (0)