Skip to content

Commit ae9aba4

Browse files
ocombevicb
authored andcommitted
feat(common): generate closure-locale.ts to tree shake locale data
Closure will only keep the data for the locale defined in `goog.LOCALE`
1 parent 8f5426a commit ae9aba4

File tree

8 files changed

+2511
-4
lines changed

8 files changed

+2511
-4
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ do
485485

486486
if [[ ${PACKAGE} == "common" ]]; then
487487
echo "====== Copy i18n locale data"
488-
rsync -a --exclude=*.d.ts --exclude=*.metadata.json ${OUT_DIR}/i18n_data/ ${NPM_DIR}/i18n_data
488+
rsync -a --exclude=*.d.ts --exclude=*.metadata.json ${OUT_DIR}/locales/ ${NPM_DIR}/locales
489489
fi
490490
else
491491
echo "====== Copy ${PACKAGE} node tool"

gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ gulp.task('changelog', loadTask('changelog'));
4444
gulp.task('check-env', () => {/* this is a noop because the env test ran already above */});
4545
gulp.task('cldr:extract', loadTask('cldr', 'extract'));
4646
gulp.task('cldr:download', loadTask('cldr', 'download'));
47+
gulp.task('cldr:gen-closure-locale', loadTask('cldr', 'closure'));

integration/bazel/angular.tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"node_modules/@angular/bazel/**",
1818
"node_modules/@angular/compiler-cli/**",
1919
// Workaround bug introduced by 079d884
20+
"node_modules/@angular/common/locales.d.ts",
2021
"node_modules/@angular/common/locales/**",
2122
"node_modules/@angular/tsc-wrapped/**"
2223
]

0 commit comments

Comments
 (0)