mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
17 lines
362 B
JavaScript
17 lines
362 B
JavaScript
/**
|
|
* 用于生成 sdk 里的多语言,目前只有德语
|
|
*/
|
|
|
|
const fs = require('fs');
|
|
|
|
try {
|
|
const localeFile = fs.readFileSync(process.argv[2], 'utf8');
|
|
console.log(
|
|
localeFile
|
|
.replace(`import {register} from '../locale';`, '')
|
|
.replace('register(', `amisRequire('amis').registerLocale(`)
|
|
);
|
|
} catch (err) {
|
|
console.error(err);
|
|
}
|