@lingual/i18n-check 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.js +3 -0
- package/package.json +1 -1
package/dist/bin/index.js
CHANGED
|
@@ -160,6 +160,7 @@ const main = async () => {
|
|
|
160
160
|
}
|
|
161
161
|
try {
|
|
162
162
|
const result = (0, __1.checkTranslations)(srcFiles, targetFiles, options);
|
|
163
|
+
let unusedKeyResult = undefined;
|
|
163
164
|
let undefinedKeyResult = undefined;
|
|
164
165
|
printTranslationResult(result);
|
|
165
166
|
if (unusedSrcPath) {
|
|
@@ -173,6 +174,7 @@ const main = async () => {
|
|
|
173
174
|
});
|
|
174
175
|
const unusedKeys = await (0, __1.checkUnusedKeys)(srcFiles, filesToParse, options, componentFunctions);
|
|
175
176
|
printUnusedKeysResult({ unusedKeys });
|
|
177
|
+
unusedKeyResult = unusedKeys;
|
|
176
178
|
const undefinedKeys = await (0, __1.checkUndefinedKeys)(srcFiles, filesToParse, options, componentFunctions);
|
|
177
179
|
printUndefinedKeysResult({
|
|
178
180
|
undefinedKeys,
|
|
@@ -183,6 +185,7 @@ const main = async () => {
|
|
|
183
185
|
console.log(chalk_1.default.green(`\nDone in ${Math.round(((end - start) * 100) / 1000) / 100}s.`));
|
|
184
186
|
if ((result.missingKeys && Object.keys(result.missingKeys).length > 0) ||
|
|
185
187
|
(result.invalidKeys && Object.keys(result.invalidKeys).length > 0) ||
|
|
188
|
+
(unusedKeyResult && Object.keys(unusedKeyResult).length > 0) ||
|
|
186
189
|
(undefinedKeyResult && Object.keys(undefinedKeyResult).length > 0)) {
|
|
187
190
|
(0, node_process_1.exit)(1);
|
|
188
191
|
}
|