feat(challenge-md): Parse seed files from md

This commit is contained in:
Bouncey
2018-09-30 20:13:52 +01:00
committed by Stuart Taylor
parent 8398522021
commit 2f193ac4ae
8 changed files with 228 additions and 6 deletions

View File

@ -10,6 +10,7 @@ const raw = require('rehype-raw');
const frontmatterToData = require('./frontmatter-to-data');
const textToData = require('./text-to-data');
const testsToData = require('./tests-to-data');
const challengeSeedToData = require('./challengeSeed-to-data');
const processor = unified()
.use(markdown)
@ -19,6 +20,7 @@ const processor = unified()
.use(remark2rehype, { allowDangerousHTML: true })
.use(raw)
.use(textToData, ['description', 'instructions'])
.use(challengeSeedToData)
// the plugins below are just to stop the processor from throwing
// we need to write a compiler that can create graphql nodes
.use(html);