2017-12-06 09:56:49 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2018-03-07 14:26:11 -05:00
|
|
|
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
2017-12-06 09:56:49 -05:00
|
|
|
|
2018-02-13 11:19:33 -05:00
|
|
|
ng_module(
|
2017-12-06 09:56:49 -05:00
|
|
|
name = "service-worker",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"*.ts",
|
|
|
|
"src/**/*.ts",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
module_name = "@angular/service-worker",
|
|
|
|
deps = [
|
|
|
|
"//packages/common",
|
|
|
|
"//packages/core",
|
|
|
|
"@rxjs",
|
2018-03-30 02:34:55 -04:00
|
|
|
"@rxjs//operators",
|
2017-12-06 09:56:49 -05:00
|
|
|
],
|
|
|
|
)
|
2018-03-07 14:26:11 -05:00
|
|
|
|
2018-03-30 12:45:42 -04:00
|
|
|
genrule(
|
|
|
|
name = "ngsw_config_binary",
|
|
|
|
srcs = ["//packages/service-worker/cli:ngsw_config.js"],
|
|
|
|
outs = ["ngsw-config.js"],
|
|
|
|
cmd = "echo '#!/usr/bin/env node' > $@ && cat $< >> $@",
|
|
|
|
)
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = "ngsw_worker_renamed",
|
|
|
|
srcs = ["//packages/service-worker/worker:ngsw_worker.es6.js"],
|
|
|
|
outs = ["ngsw-worker.js"],
|
|
|
|
cmd = "cp $< $@",
|
|
|
|
)
|
|
|
|
|
2018-03-07 14:26:11 -05:00
|
|
|
ng_package(
|
|
|
|
name = "npm_package",
|
2018-03-13 14:00:53 -04:00
|
|
|
srcs = [
|
|
|
|
"package.json",
|
2018-03-30 12:45:42 -04:00
|
|
|
"safety-worker.js",
|
2018-03-13 14:00:53 -04:00
|
|
|
"//packages/service-worker/config:package.json",
|
|
|
|
],
|
2018-03-30 12:45:42 -04:00
|
|
|
data = [
|
|
|
|
":ngsw_config_binary",
|
|
|
|
":ngsw_worker_renamed",
|
|
|
|
"//packages/service-worker/config",
|
|
|
|
],
|
2018-03-07 14:26:11 -05:00
|
|
|
entry_point = "packages/service-worker/index.js",
|
2018-03-30 16:48:47 -04:00
|
|
|
tags = [
|
2018-06-05 14:38:46 -04:00
|
|
|
"ivy-jit",
|
2018-03-30 12:45:42 -04:00
|
|
|
"release-with-framework",
|
2018-03-30 16:48:47 -04:00
|
|
|
],
|
2018-03-07 14:26:11 -05:00
|
|
|
deps = [
|
|
|
|
":service-worker",
|
|
|
|
"//packages/service-worker/config",
|
|
|
|
],
|
|
|
|
)
|