INNER CODE UNIT · JavaScript
sharedPartials
codeceptjs/CodeceptJS · Bunoshfile.js:52
const sharedPartials = fs.readdirSync('docs/shared').filter(f => path.extname(f) === '.mustache')
const sharedPlaceholders = sharedPartials.map(file => `{{ ${path.basename(file, '.mustache')} }}`)
const sharedTemplates = sharedPartials.map(file => fs.readFileSync(`docs/shared/${file}`).toString()).map(template => `\n\n\n${template}`)
const index = []
for (const file of files) {
const name = path.basename(file, '.js')
say(`Writing documentation for ${name} plugin`)
await shell`npx documentation build lib/plugin/${file} -o ${pluginMarkDownFile(name)} ${documentjsCliArgs}`
replaceInFile(pluginMarkDownFile(name), cfg => {
cfg.replace(/\(optional, default.*?\)/gm, '')
cfg.replace(/\\*/gm, '')
})
replaceInFile(pluginMarkDownFile(name), cfg => {