fix(current-challenge): Fix current-challenge API

This commit is contained in:
Bouncey
2018-10-28 06:18:13 +00:00
committed by mrugesh mohapatra
parent e7316e4567
commit dace86663f
4 changed files with 144 additions and 128 deletions

View File

@ -4,6 +4,8 @@ const readDirP = require('readdirp-walk');
const { parseMarkdown } = require('@freecodecamp/challenge-md-parser');
const { dasherize } = require('./utils');
const challengesDir = path.resolve(__dirname, './challenges');
exports.getChallengesForLang = function getChallengesForLang(lang) {
@ -57,6 +59,7 @@ async function buildCurriculum(file, curriculum) {
);
const { name: blockName, order, superOrder } = meta;
challenge.block = blockName;
challenge.dashedName = dasherize(challenge.title);
challenge.order = order;
challenge.superOrder = superOrder;
challenge.superBlock = superBlock;