Webatrice: husky (#4591)

This commit is contained in:
Jeremy Letto 2022-03-13 12:44:51 -05:00 committed by GitHub
parent b464fa8d99
commit 2c702d3579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 7 deletions

View file

@ -18,14 +18,20 @@ const sharedFiles = [
const i18nFileRegex = /\.i18n\.json$/;
const i18nOnly = process.argv.indexOf('-i18nOnly') > -1;
(async () => {
if (i18nOnly) {
await createI18NDefault();
return;
}
// make sure these files finish copying before master file is created
await copySharedFiles();
createMasterProtoFile();
createServerProps();
createI18NDefault();
await createMasterProtoFile();
await createServerProps();
await createI18NDefault();
})();
async function copySharedFiles() {
@ -37,7 +43,7 @@ async function copySharedFiles() {
}
}
function createMasterProtoFile() {
async function createMasterProtoFile() {
try {
fse.readdir(protoFilesDir, (err, files) => {
if (err) throw err;