test: update ng_package tests to use bundle_dts (#28588)
PR Close #28588
This commit is contained in:
parent
3d39100c85
commit
3bb3d6d3e6
|
@ -5,6 +5,7 @@ load("//tools:defaults.bzl", "ng_module", "ng_package", "npm_package")
|
||||||
ng_module(
|
ng_module(
|
||||||
name = "example",
|
name = "example",
|
||||||
srcs = glob(["*.ts"]),
|
srcs = glob(["*.ts"]),
|
||||||
|
bundle_dts = True,
|
||||||
module_name = "example",
|
module_name = "example",
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/bazel/test/ng_package/example/secondary",
|
"//packages/bazel/test/ng_package/example/secondary",
|
||||||
|
|
|
@ -5,6 +5,7 @@ load("//tools:defaults.bzl", "ng_module")
|
||||||
ng_module(
|
ng_module(
|
||||||
name = "secondary",
|
name = "secondary",
|
||||||
srcs = glob(["*.ts"]),
|
srcs = glob(["*.ts"]),
|
||||||
|
bundle_dts = True,
|
||||||
module_name = "example/secondary",
|
module_name = "example/secondary",
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
|
|
@ -42,15 +42,11 @@ fesm5
|
||||||
fesm5/secondary.js.map
|
fesm5/secondary.js.map
|
||||||
fesm5/waffels.js
|
fesm5/waffels.js
|
||||||
fesm5/waffels.js.map
|
fesm5/waffels.js.map
|
||||||
index.d.ts
|
|
||||||
mymodule.d.ts
|
|
||||||
package.json
|
package.json
|
||||||
secondary
|
secondary
|
||||||
secondary/index.d.ts
|
|
||||||
secondary/package.json
|
secondary/package.json
|
||||||
secondary/secondary.d.ts
|
secondary/secondary.d.ts
|
||||||
secondary/secondary.metadata.json
|
secondary/secondary.metadata.json
|
||||||
secondary/secondarymodule.d.ts
|
|
||||||
secondary.d.ts
|
secondary.d.ts
|
||||||
secondary.metadata.json
|
secondary.metadata.json
|
||||||
some-file.txt
|
some-file.txt
|
||||||
|
@ -482,14 +478,22 @@ export var a = 1;
|
||||||
--- example.d.ts ---
|
--- example.d.ts ---
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated bundle index. Do not edit.
|
* @license Angular v0.0.0
|
||||||
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
||||||
|
* License: MIT
|
||||||
*/
|
*/
|
||||||
export * from './index';
|
|
||||||
|
|
||||||
|
|
||||||
|
export declare class MyModule {
|
||||||
|
}
|
||||||
|
|
||||||
|
export { }
|
||||||
|
|
||||||
|
|
||||||
--- example.metadata.json ---
|
--- example.metadata.json ---
|
||||||
|
|
||||||
{"__symbolic":"module","version":4,"metadata":{"MyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{}]}],"members":{}}},"origins":{"MyModule":"./mymodule"},"importAs":"example"}
|
{"__symbolic":"module","version":4,"metadata":{"MyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{}]}],"members":{}}},"origins":{"MyModule":"./example"},"importAs":"example"}
|
||||||
|
|
||||||
--- extra-styles.css ---
|
--- extra-styles.css ---
|
||||||
|
|
||||||
|
@ -653,31 +657,6 @@ export { MyModule };
|
||||||
//# sourceMappingURL=waffels.js.map
|
//# sourceMappingURL=waffels.js.map
|
||||||
|
|
||||||
|
|
||||||
--- index.d.ts ---
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Google Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style license that can be
|
|
||||||
* found in the LICENSE file at https://angular.io/license
|
|
||||||
*/
|
|
||||||
export * from './mymodule';
|
|
||||||
|
|
||||||
|
|
||||||
--- mymodule.d.ts ---
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Google Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style license that can be
|
|
||||||
* found in the LICENSE file at https://angular.io/license
|
|
||||||
*/
|
|
||||||
export declare class MyModule {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
--- package.json ---
|
--- package.json ---
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -693,18 +672,6 @@ export declare class MyModule {
|
||||||
"es2015": "./fesm2015/example.js"
|
"es2015": "./fesm2015/example.js"
|
||||||
}
|
}
|
||||||
|
|
||||||
--- secondary/index.d.ts ---
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Google Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style license that can be
|
|
||||||
* found in the LICENSE file at https://angular.io/license
|
|
||||||
*/
|
|
||||||
export * from './secondarymodule';
|
|
||||||
|
|
||||||
|
|
||||||
--- secondary/package.json ---
|
--- secondary/package.json ---
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -722,28 +689,24 @@ export * from './secondarymodule';
|
||||||
--- secondary/secondary.d.ts ---
|
--- secondary/secondary.d.ts ---
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated bundle index. Do not edit.
|
* @license Angular v0.0.0
|
||||||
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
||||||
|
* License: MIT
|
||||||
*/
|
*/
|
||||||
export * from './index';
|
|
||||||
|
|
||||||
|
export declare const a = 1;
|
||||||
|
|
||||||
|
|
||||||
|
export declare class SecondaryModule {
|
||||||
|
}
|
||||||
|
|
||||||
|
export { }
|
||||||
|
|
||||||
|
|
||||||
--- secondary/secondary.metadata.json ---
|
--- secondary/secondary.metadata.json ---
|
||||||
|
|
||||||
{"__symbolic":"module","version":4,"metadata":{"SecondaryModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{}]}],"members":{}},"a":1},"origins":{"SecondaryModule":"./secondarymodule","a":"./secondarymodule"},"importAs":"example/secondary"}
|
{"__symbolic":"module","version":4,"metadata":{"SecondaryModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{}]}],"members":{}},"a":1},"origins":{"SecondaryModule":"./secondary","a":"./secondary"},"importAs":"example/secondary"}
|
||||||
|
|
||||||
--- secondary/secondarymodule.d.ts ---
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Google Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style license that can be
|
|
||||||
* found in the LICENSE file at https://angular.io/license
|
|
||||||
*/
|
|
||||||
export declare class SecondaryModule {
|
|
||||||
}
|
|
||||||
export declare const a = 1;
|
|
||||||
|
|
||||||
|
|
||||||
--- secondary.d.ts ---
|
--- secondary.d.ts ---
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue