fix(docs-infra): correctly add `polyfills.ts` file as boilerplate for `i18n` docs examples (#38173)
Docs examples of type `i18n` need a slightly modified version of `polyfills.ts` that imports `@angular/localize/init`. Previously, this file was not included in `i18n` example projects for two reasons: - While the file was included in the `i18n` boilerplate files (at `aio/tools/examples/shared/boilerplate/i18n/`), it was not included in the boilerplate file list in `example-boilerplate.js`. - The file was in the wrong location: It was located at the project root instead of inside the `src/` directory. This commit addresses the above issues (i.e. adds the file to the boilerplate file list for `i18n` projects and moves the file inside the `src/` directory). PR Close #38173
This commit is contained in:
parent
b3d81a837b
commit
937b89c230
|
@ -32,7 +32,7 @@ const cliRelativePath = BOILERPLATE_PATHS.cli.map(file => `../cli/${file}`);
|
|||
|
||||
BOILERPLATE_PATHS.elements = [...cliRelativePath, 'package.json', 'src/polyfills.ts'];
|
||||
|
||||
BOILERPLATE_PATHS.i18n = [...cliRelativePath, 'angular.json', 'package.json'];
|
||||
BOILERPLATE_PATHS.i18n = [...cliRelativePath, 'angular.json', 'package.json', 'src/polyfills.ts'];
|
||||
|
||||
BOILERPLATE_PATHS['service-worker'] = [...cliRelativePath, 'angular.json', 'package.json'];
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ describe('example-boilerplate tool', () => {
|
|||
const sharedNodeModulesDir = path.resolve(sharedDir, 'node_modules');
|
||||
const BPFiles = {
|
||||
cli: 20,
|
||||
i18n: 2,
|
||||
i18n: 3,
|
||||
universal: 2,
|
||||
systemjs: 7,
|
||||
common: 1,
|
||||
|
|
Loading…
Reference in New Issue