ng-extract-i18n-merge
Version:
Extract and merge i18n xliff translation files for angular projects.
18 lines (17 loc) • 439 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.readFileIfExists = void 0;
const fs_1 = require("fs");
async function readFileIfExists(path) {
try {
return await fs_1.promises.readFile(path, 'utf8');
}
catch (e) {
// a missing file is OK
if (e.code !== 'ENOENT') {
throw e;
}
}
return null;
}
exports.readFileIfExists = readFileIfExists;
;