forked from gnucoop/ajf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
123 lines (116 loc) · 4.05 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web")
load("//:packages.bzl", "getThirdPartyUmdTargets")
load("//tools:create-system-config.bzl", "create_system_config")
load("//tools:defaults.bzl", "ng_module")
load("//tools:es5-named-output.bzl", "es5_named_output")
load("//tools/dev-server:index.bzl", "dev_server")
package(default_visibility = ["//visibility:public"])
ng_module(
name = "dev-app",
srcs = [
"dev-app.ts",
"main.ts",
"main-module.ts",
],
deps = [
"//src/dev-app/dev-app",
"//src/dev-app/example",
"//src/dev-app/examples-page",
"//src/dev-app/file-input",
"//src/dev-app/ion-barcode",
"//src/dev-app/ion-calendar",
"//src/dev-app/ion-checkbox-group",
"//src/dev-app/ion-fields",
"//src/dev-app/ion-forms",
"//src/dev-app/ion-image",
"//src/dev-app/ion-node-icon",
"//src/dev-app/ion-page-slider",
"//src/dev-app/ion-reports",
"//src/dev-app/ion-widgets",
"//src/dev-app/mat-barcode",
"//src/dev-app/mat-calendar",
"//src/dev-app/mat-calendar-ethiopian",
"//src/dev-app/mat-checkbox-group",
"//src/dev-app/mat-fields",
"//src/dev-app/mat-form-builder",
"//src/dev-app/mat-forms",
"//src/dev-app/mat-image",
"//src/dev-app/mat-node-icon",
"//src/dev-app/mat-page-slider",
"//src/dev-app/mat-report-builder",
"//src/dev-app/mat-reports",
"//src/dev-app/mat-time",
"//src/dev-app/mat-widgets",
"@npm//@angular/cdk",
"@npm//@angular/router",
"@npm//@gic/angular",
"@npm//@ionic/angular",
],
)
create_system_config(
name = "system-config",
output_name = "system-config.js",
)
# File group for all static files which are needed to serve the dev-app. These files are
# used in the devserver as runfiles and will be copied into the static web package that can
# be deployed on static hosting services (like firebase).
filegroup(
name = "dev_app_static_files",
srcs = [
"favicon.ico",
"index.html",
":system-config",
"//tools:system-rxjs-operators.js",
"@npm//:node_modules/@ajf/icons/css/ajf-icons.css",
"@npm//:node_modules/@ajf/icons/fonts/ajf.eot",
"@npm//:node_modules/@ajf/icons/fonts/ajf.svg",
"@npm//:node_modules/@ajf/icons/fonts/ajf.ttf",
"@npm//:node_modules/@ajf/icons/fonts/ajf.woff",
"@npm//:node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"@npm//:node_modules/@ionic/angular/css/ionic.bundle.css",
"@npm//:node_modules/core-js-bundle/index.js",
"@npm//:node_modules/flag-icon-css/css/flag-icon.min.css",
"@npm//:node_modules/flag-icon-css/flags/4x3/bf.svg",
"@npm//:node_modules/leaflet/dist/leaflet.css",
"@npm//:node_modules/rxjs/bundles/rxjs.umd.min.js",
"@npm//:node_modules/systemjs/dist/system.js",
"@npm//:node_modules/tslib/tslib.js",
"@npm//:node_modules/zone.js/dist/zone.js",
] + getThirdPartyUmdTargets(),
)
dev_server(
name = "devserver",
srcs = [":dev_app_static_files"],
additional_root_paths = [
"npm",
"npm/node_modules",
# Needed for compatibility with "pkg_web" which always uses the tree
# artifact output as workspace root.
"gc_ajf",
],
tags = ["manual"],
deps = [
":dev-app",
],
)
# Collects all ES5 JavaScript files which are required to serve the dev-app. By default,
# ts_library and ng_module targets only expose the type definitmat files as outputs.
es5_named_output(
name = "dev_app_js_sources",
tags = ["manual"],
deps = [":dev-app"],
)
# Target that builds a static web package of the dev-app. The web package can be
# deployed on static hosting services (such as firebase).
pkg_web(
name = "web_package",
srcs = [
":dev_app_js_sources",
":dev_app_static_files",
],
additional_root_paths = [
"external/npm",
"npm/node_modules",
],
tags = ["manual"],
)