update locale packaging config

This commit is contained in:
Lawrence Lee 2017-07-17 23:36:33 +08:00
parent 0813a64c86
commit aaf900f319
2 changed files with 10 additions and 13 deletions

8
build/locale.js Normal file
View file

@ -0,0 +1,8 @@
const readDir = require('fs').readdirSync
const files = readDir('./src/locale/lang')
const entry = {}
files.forEach(file => {
const name = file.split('.')[0]
entry[name] = './src/locale/lang/' + file
})
module.exports = entry