skypager-project
Version:
skypager project framework
18 lines (16 loc) • 503 B
JavaScript
export const testDocument = (doc) =>
doc.fileExtname === '.md' &&
doc.fileStem.match(/^[A-Z]+/) &&
!doc.fileStem.match(/spec/) &&
!doc.fileStem.match(/README|LICENSE|CONTRIBUTING/i)
export const decorate = (doc) =>
Object.assign(doc, {
toProjectConfiguration() {
const exportable = doc.createExportable()
return Object.assign({},
doc.pick('id', 'cacheKey', 'idParts', 'baseRelativePath'),
exportable.frontmatter,
exportable
)
}
})