-
-
Save darkwing/37ce7c59f937e36cba02fcb6711328bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { spawn, execSync } = require("child_process"); | |
const localeKeys = execSync( | |
"grep -Eo '^([A-z0-9.]+)' devtools/client/locales/en-US/debugger.properties" | |
) | |
.toString() | |
.split("\n") | |
.filter(Boolean); | |
const unusedKeys = localeKeys.filter(key => { | |
const results = execSync( | |
`grep -ro '${key}' devtools/client/debugger/src/ | wc -l | xargs` | |
) | |
.toString() | |
.split("\n"); | |
//console.log(`results for ${key} is: ${results}`); | |
return Number(results.toString().replace(",", "")) == 0; | |
}); | |
console.log("-------------------------"); | |
console.log("Unused keys: \n", unusedKeys.join("\n")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment