mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-24 10:00:52 -04:00
20 lines
486 B
JavaScript
20 lines
486 B
JavaScript
const readDirP = require('readdirp-walk');
|
|
const { getText } = require('./transform-to-mdx');
|
|
const { validateHints } = require('./create-mdx');
|
|
|
|
const challengeDir = '../../../../curriculum/challenges/english';
|
|
|
|
readDirP({
|
|
root: challengeDir,
|
|
fileFilter: ['*.md']
|
|
}).on('data', file => {
|
|
if (file.stat.isFile()) {
|
|
getText(file.fullPath)
|
|
.then(validateHints)
|
|
.catch(() => {
|
|
console.log('invalid hint in');
|
|
console.log(file.path);
|
|
});
|
|
}
|
|
});
|