mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-03 15:05:01 -05:00
14 lines
385 B
JavaScript
14 lines
385 B
JavaScript
const { join } = require('path');
|
|
const remark = require('remark');
|
|
const directive = require('remark-directive');
|
|
const frontmatter = require('remark-frontmatter');
|
|
const { read } = require('to-vfile');
|
|
|
|
const parseFixture = async (filename) => remark()
|
|
.use(directive)
|
|
.use(frontmatter, ['yaml'])
|
|
.parse(await read(join(__dirname, filename)));
|
|
|
|
|
|
module.exports = parseFixture;
|