Revision 3d71d9ddd9ffa138af4e5f4230132b7632070ba3 authored by Alex Rickabaugh on 16 March 2023, 19:01:11 UTC, committed by Alex Rickabaugh on 16 March 2023, 19:08:14 UTC
1 parent c981644
Raw File
test-locale-folder.js
const fs = require('fs');
const path = require('path');

const packageJson = require('@angular/common/package.json');
const localesFolder = packageJson['locales'];
if (!localesFolder) {
  throw new Error(`@angular/common/package.json does not contain 'locales' entry.`)
}
const enLocalePath = `@angular/common/${localesFolder}/en`;
try {
  require.resolve(enLocalePath);
} catch (err) {
  throw new Error(`@angular/common does not contain 'en' locale in ${enLocalePath}.`)
}
back to top