Nightly Issues (2) (#2619)
This commit is contained in:
parent
a9cde5eaf7
commit
601acf5a84
2 changed files with 9 additions and 1 deletions
|
|
@ -15,7 +15,13 @@ function generateChecksum(str, algorithm, encoding) {
|
|||
const result = {};
|
||||
|
||||
glob.sync(`${jsonFilesDir}**/*.json`).forEach(path => {
|
||||
const [_, lang] = path.split('dist\\browser\\assets\\langs\\');
|
||||
console.log('Calculating hash for ', path);
|
||||
let tokens = path.split('dist\\browser\\assets\\langs\\');
|
||||
if (tokens.length === 1) {
|
||||
tokens = path.split('dist/browser/assets/langs/');
|
||||
}
|
||||
const lang = tokens[1];
|
||||
console.log('Language: ', lang);
|
||||
const content = fs.readFileSync(path, { encoding: 'utf-8' });
|
||||
result[lang.replace('.json', '')] = generateChecksum(content);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue