Skip to content

Commit 803ff5e

Browse files
committed
build(@ngtools/webpack): build and test with Bazel
1 parent 8f614d5 commit 803ff5e

File tree

3 files changed

+86
-3
lines changed

3 files changed

+86
-3
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"conventional-changelog": "^3.0.0",
108108
"conventional-commits-parser": "^3.0.0",
109109
"debug": "^4.1.1",
110+
"enhanced-resolve": "4.1.1",
110111
"fast-json-stable-stringify": "2.1.0",
111112
"gh-got": "^9.0.0",
112113
"git-raw-commits": "^2.0.0",
@@ -145,7 +146,9 @@
145146
"tslint-no-circular-imports": "^0.7.0",
146147
"tslint-sonarts": "1.9.0",
147148
"typescript": "3.8.3",
148-
"verdaccio": "4.4.4"
149+
"verdaccio": "4.4.4",
150+
"webpack": "4.42.0",
151+
"webpack-sources": "1.4.3"
149152
},
150153
"husky": {
151154
"hooks": {

packages/ngtools/webpack/BUILD

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Copyright Google Inc. All Rights Reserved.
2+
#
3+
# Use of this source code is governed by an MIT-style license that can be
4+
# found in the LICENSE file at https://angular.io/license
5+
6+
licenses(["notice"]) # MIT
7+
8+
load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test")
9+
load("@npm_bazel_typescript//:index.bzl", "ts_library")
10+
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
11+
12+
package(default_visibility = ["//visibility:public"])
13+
14+
ts_library(
15+
name = "webpack",
16+
srcs = glob(
17+
include = [
18+
"src/**/*.ts",
19+
],
20+
exclude = [
21+
"src/**/*_spec.ts",
22+
"src/**/*_spec_helpers.ts",
23+
],
24+
),
25+
data = glob(
26+
include = [
27+
"src/type_checker_bootstrap.js",
28+
"package.json",
29+
],
30+
),
31+
module_name = "@ngtools/webpack",
32+
module_root = "src/index.d.ts",
33+
deps = [
34+
"//packages/angular_devkit/core",
35+
"//packages/angular_devkit/core:node",
36+
"@npm//@angular/compiler-cli",
37+
"@npm//@types/node",
38+
"@npm//@types/webpack",
39+
"@npm//@types/webpack-sources",
40+
"@npm//enhanced-resolve",
41+
"@npm//rxjs",
42+
"@npm//typescript",
43+
"@npm//webpack",
44+
"@npm//webpack-sources",
45+
],
46+
)
47+
48+
ts_library(
49+
name = "webpack_test_lib",
50+
testonly = True,
51+
srcs = glob(
52+
include = [
53+
"src/**/*_spec.ts",
54+
"src/**/*_spec_helpers.ts",
55+
],
56+
),
57+
tsconfig = "//:tsconfig-test.json",
58+
deps = [
59+
":webpack",
60+
"//packages/angular_devkit/core",
61+
"@npm//@angular/compiler",
62+
"@npm//@types/jasmine",
63+
"@npm//jasmine",
64+
"@npm//typescript",
65+
],
66+
)
67+
68+
jasmine_node_test(
69+
name = "webpack_test",
70+
srcs = [":webpack_test_lib"],
71+
deps = [
72+
"@npm//jasmine",
73+
"@npm//source-map",
74+
],
75+
)
76+
77+
pkg_npm(
78+
name = "npm_package",
79+
deps = [
80+
":webpack",
81+
],
82+
)

yarn.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5091,7 +5091,6 @@ fsevents@^1.2.7:
50915091
dependencies:
50925092
bindings "^1.5.0"
50935093
nan "^2.12.1"
5094-
node-pre-gyp "*"
50955094

50965095
fsevents@~2.1.2:
50975096
version "2.1.2"
@@ -10081,7 +10080,6 @@ [email protected], sass@^1.23.0:
1008110080

1008210081
"sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz":
1008310082
version "0.0.0"
10084-
uid dc5efcd2be24ddb099a85b923d6e754754651fa8
1008510083
resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8"
1008610084

1008710085
saucelabs@^1.5.0:

0 commit comments

Comments
 (0)