build: fix common locales in npm package (#23153)

PR Close #23153
This commit is contained in:
Alex Eagle 2018-04-03 14:10:21 -07:00 committed by Alex Rickabaugh
parent 1678423619
commit 46eadb5cfb
3 changed files with 7 additions and 6 deletions

View File

@ -18,13 +18,11 @@ describe('@angular/common ng_package', () => {
const files = shx.ls('locales').stdout.split('\n');
expect(files.some(n => n.endsWith('.d.ts'))).toBe(true, `.d.ts files don't exist`);
expect(files.some(n => n.endsWith('.js'))).toBe(true, `.js files don't exist`);
expect(files.some(n => n.endsWith('.js.map'))).toBe(true, `.js.map files don't exist`);
});
it('/locales/extra', () => {
const files = shx.ls('locales/extra').stdout.split('\n');
expect(files.some(n => n.endsWith('.d.ts'))).toBe(true, `.d.ts files don't exist`);
expect(files.some(n => n.endsWith('.js'))).toBe(true, `.js files don't exist`);
expect(files.some(n => n.endsWith('.js.map'))).toBe(true, `.js.map files don't exist`);
});
});

View File

@ -25,10 +25,8 @@ ng_package(
"//packages/common/http/testing:package.json",
"//packages/common/testing:package.json",
],
data = [
"//packages/common/locales",
],
entry_point = "packages/common/index.js",
packages = ["//packages/common/locales:package"],
tags = ["release-with-framework"],
deps = [
"//packages/common",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library", "npm_package")
ts_library(
name = "locales",
@ -10,3 +10,8 @@ ts_library(
),
module_name = "@angular/common/locales",
)
npm_package(
name = "package",
deps = [":locales"],
)