(file, docsPath)
| 62 | } |
| 63 | |
| 64 | async function updateContents(file, docsPath) { |
| 65 | const content = await fs.readFile(file, 'utf-8') |
| 66 | // Only sync content with frontmatter |
| 67 | if (content.startsWith('<!--')) { |
| 68 | const newContent = formatContent(content) |
| 69 | // console.log('newContent', newContent) |
| 70 | await fs.writeFile(docsPath, newContent) |
| 71 | console.log(`Docs synced to ${docsPath}`) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | async function syncDocs() { |
| 76 | const files = await getFiles() |
no test coverage detected