This commit is contained in:
parent
2a681ecaf0
commit
71510cc882
|
|
@ -54,28 +54,10 @@ function buildLocales({
|
||||||
}
|
}
|
||||||
|
|
||||||
function readProject(json, projectPath, buildPath, nodeEnv, platform) {
|
function readProject(json, projectPath, buildPath, nodeEnv, platform) {
|
||||||
// 读取oak-app-domain/
|
['oak-app-domain', 'pages', 'components', 'locales'].forEach((ele) => {
|
||||||
const domainLocalesPath = Path.resolve(
|
const path = Path.resolve(projectPath, ele).replace(/\\/g, '/');
|
||||||
projectPath,
|
findLocaleFiles(json, path, '', buildPath, nodeEnv, platform);
|
||||||
'oak-app-domain'
|
});
|
||||||
).replace(/\\/g, '/');
|
|
||||||
findLocaleFiles(json, domainLocalesPath, '', buildPath, nodeEnv, platform);
|
|
||||||
|
|
||||||
// 读取business/locales
|
|
||||||
const localesPath = Path.resolve(projectPath, 'locales').replace(
|
|
||||||
/\\/g,
|
|
||||||
'/'
|
|
||||||
);
|
|
||||||
findLocaleFiles(json, localesPath, '', buildPath, nodeEnv, platform);
|
|
||||||
|
|
||||||
const pagesPath = Path.resolve(projectPath, 'pages').replace(/\\/g, '/');
|
|
||||||
findLocaleFiles(json, pagesPath, '', buildPath, nodeEnv, platform);
|
|
||||||
|
|
||||||
const componentsPath = Path.resolve(projectPath, 'components').replace(
|
|
||||||
/\\/g,
|
|
||||||
'/'
|
|
||||||
);
|
|
||||||
findLocaleFiles(json, componentsPath, '', buildPath, nodeEnv, platform);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function readLocaleFiles(json, path, name) {
|
function readLocaleFiles(json, path, name) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue