feat: add Spanish and language parser
This commit is contained in:
committed by
mrugesh mohapatra
parent
c2a45b58be
commit
e3f9dc4b86
@ -1,18 +1,23 @@
|
||||
const fs = require('fs-extra');
|
||||
const gulp = require('gulp');
|
||||
|
||||
const { locale } = require('../config/env.json');
|
||||
const {
|
||||
locale
|
||||
} = require('../config/env.json');
|
||||
|
||||
const { getChallengesForLang } = require('./getChallenges');
|
||||
const {
|
||||
getChallengesForLang
|
||||
} = require('./getChallenges');
|
||||
|
||||
function generateCurriculum(done) {
|
||||
return getChallengesForLang(locale)
|
||||
.then(curriculum =>
|
||||
.then(curriculum => {
|
||||
fs.ensureFileSync(`./build/curriculum-${locale}.json`);
|
||||
fs.writeFile(
|
||||
`./build/curriculum-${locale}.json`,
|
||||
JSON.stringify(curriculum)
|
||||
)
|
||||
)
|
||||
})
|
||||
.then(done);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user