2017-12-06 09:56:49 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
2017-06-02 12:43:52 -04:00
|
|
|
|
2018-02-13 14:26:06 -05:00
|
|
|
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
2017-07-21 17:20:34 -04:00
|
|
|
|
|
|
|
ng_module(
|
2017-12-06 09:56:49 -05:00
|
|
|
name = "core",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"*.ts",
|
|
|
|
"src/**/*.ts",
|
|
|
|
],
|
2018-05-03 13:40:31 -04:00
|
|
|
exclude = ["src/ivy_switch.ts"],
|
|
|
|
) + [
|
|
|
|
":ivy_switch",
|
|
|
|
],
|
2017-12-06 09:56:49 -05:00
|
|
|
module_name = "@angular/core",
|
|
|
|
deps = [
|
2017-12-01 17:23:03 -05:00
|
|
|
"//packages:types",
|
2018-05-09 11:35:25 -04:00
|
|
|
"//packages/compiler",
|
2017-12-06 09:56:49 -05:00
|
|
|
"@rxjs",
|
|
|
|
],
|
|
|
|
)
|
2018-02-13 14:26:06 -05:00
|
|
|
|
|
|
|
ng_package(
|
|
|
|
name = "npm_package",
|
2018-03-13 14:00:53 -04:00
|
|
|
srcs = glob(["**/*.externs.js"]) + [
|
|
|
|
"package.json",
|
|
|
|
"//packages/core/testing:package.json",
|
|
|
|
],
|
2018-02-13 14:26:06 -05:00
|
|
|
entry_point = "packages/core/index.js",
|
2018-03-30 16:48:47 -04:00
|
|
|
tags = ["release-with-framework"],
|
2018-02-13 14:26:06 -05:00
|
|
|
deps = [
|
|
|
|
":core",
|
|
|
|
"//packages/core/testing",
|
|
|
|
],
|
|
|
|
)
|
2018-05-03 13:40:31 -04:00
|
|
|
|
|
|
|
## Controls if Ivy is enabled. (Temporary target until we permanently switch over to Ivy)
|
|
|
|
##
|
|
|
|
## This file generates `src/ivy_switch.ts` file which reexports symbols for `ViewEngine` or `Ivy.`
|
|
|
|
## - append `--define=ivy=false` (default) to `bazel` command to reexport `./ivy_switch_false`
|
|
|
|
## and use `ViewEngine`;
|
|
|
|
## - append `--define=ivy=true` to `bazel` command to rexport `./ivy_switch_true` and use `Ivy`;
|
|
|
|
##
|
|
|
|
## NOTE: `--define=ivy=true` works with any `bazel` command or target across the repo.
|
|
|
|
##
|
|
|
|
## See: `//tools/bazel.rc` where `--define=ivy=false` is defined as default.
|
|
|
|
## See: `./src/ivy_switch.ts` for more details.
|
|
|
|
genrule(
|
|
|
|
name = "ivy_switch",
|
|
|
|
outs = ["src/ivy_switch.ts"],
|
|
|
|
cmd = "echo export '*' from \"'./ivy_switch_$(ivy)';\" > $@",
|
|
|
|
)
|