UNPKG

greenwood-starter-presentation

Version:

A Greenwood plugin and general purpose starter kit for creating slide decks and presentations from markdown.

25 lines (21 loc) 673 B
import fs from 'fs'; import path from 'path'; import { fileURLToPath, URL } from 'url'; const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); const greenwoodThemeStarterPresentation = (options = {}) => [{ type: 'context', name: `${packageJson.name}:context`, provider: (compilation) => { const templateLocation = options.__isDevelopment // eslint-disable-line no-underscore-dangle ? path.join(compilation.context.userWorkspace, 'layouts') : fileURLToPath(new URL('dist/layouts', import.meta.url)); return { templates: [ templateLocation ] }; } }]; export { greenwoodThemeStarterPresentation };