MCPcopy Create free account
hub / github.com/DavidWells/analytics / updateContents

Function updateContents

site/sync.js:64–73  ·  view source on GitHub ↗
(file, docsPath)

Source from the content-addressed store, hash-verified

62}
63
64async 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
75async function syncDocs() {
76 const files = await getFiles()

Callers 1

syncDocsFunction · 0.85

Calls 1

formatContentFunction · 0.85

Tested by

no test coverage detected