feat: Kernel module
This commit is contained in:
@@ -65,27 +65,6 @@ module.exports = Promise.mapSeries([
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* i18n
|
||||
*/
|
||||
() => {
|
||||
console.info(colors.white(' └── ') + colors.green('Copying i18n client files...'))
|
||||
return fs.ensureDirAsync('./assets/js/i18n').then(() => {
|
||||
return fs.readJsonAsync('./server/locales/en/browser.json').then(enContent => {
|
||||
return fs.readdirAsync('./server/locales').then(langs => {
|
||||
return Promise.map(langs, lang => {
|
||||
console.info(colors.white(' ' + lang + '.json'))
|
||||
let outputPath = path.join('./assets/js/i18n', lang + '.json')
|
||||
return fs.readJsonAsync(path.join('./server/locales', lang + 'browser.json'), 'utf8').then((content) => {
|
||||
return fs.outputJsonAsync(outputPath, _.defaultsDeep(content, enContent))
|
||||
}).catch(err => { // eslint-disable-line handle-callback-err
|
||||
return fs.outputJsonAsync(outputPath, enContent)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* Delete Fusebox cache
|
||||
*/
|
||||
|
Reference in New Issue
Block a user