skypager-project
Version:
skypager project framework
20 lines (16 loc) • 503 B
JavaScript
import { applyTo } from '../transformers/markdown'
export const render = (options = {}, context = {}) => {
if (typeof options === 'string') {
options = {
pattern: options
}
}
const { project } = context
const {
pattern = '*.md'
} = options
const docs = options.document
? typeof options.document === 'string' ? [project.document(options.document)] : [options.document]
: project.query(pattern, false)
return docs.map(d => d.ready.get('exportables.html'))
}