Skip to content

Commit

Permalink
build: update bazel rules to latest (angular#18289)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored and mhevery committed Jul 21, 2017
1 parent b7a6f52 commit 0317c4c
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- restore_cache:
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}

- run: bazel run @io_bazel_rules_typescript_node//:bin/npm install
- run: bazel run @build_bazel_rules_typescript_node//:bin/npm install
- run: bazel build packages/...
- save_cache:
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
Expand Down
9 changes: 8 additions & 1 deletion BUILD → BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ filegroup(
# This won't scale in the general case.
# TODO(alexeagle): figure out what to do
"node_modules/typescript/**",
"node_modules/zone.js/**/*.d.ts",
"node_modules/zone.js/**",
"node_modules/rxjs/**/*.d.ts",
"node_modules/rxjs/**/*.js",
"node_modules/@types/**/*.d.ts",
"node_modules/tsickle/**",
"node_modules/hammerjs/**/*.d.ts",
"node_modules/protobufjs/**",
"node_modules/bytebuffer/**",
"node_modules/reflect-metadata/**",
"node_modules/minimist/**/*.js",
]),
)
12 changes: 9 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "io_bazel_rules_typescript",
name = "build_bazel_rules_typescript",
remote = "https://github.com/bazelbuild/rules_typescript.git",
commit = "3a8404d",
tag = "0.0.5",
)

load("@io_bazel_rules_typescript//:defs.bzl", "node_repositories")
load("@build_bazel_rules_typescript//:defs.bzl", "node_repositories")

node_repositories(package_json = "//:package.json")

git_repository(
name = "build_bazel_rules_angular",
remote = "https://github.com/bazelbuild/rules_angular.git",
tag = "0.0.1",
)
4 changes: 2 additions & 2 deletions docs/BAZEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ you run the first build.

The `WORKSPACE` file indicates that our root directory is a
Bazel project. It contains the version of the Bazel rules we
use to execute build steps, from `io_bazel_rules_typescript`.
use to execute build steps, from `build_bazel_rules_typescript`.
The sources on [GitHub] are published from Google's internal
repository (google3).

That repository defines dependencies on specific versions of
all the tools. You can run the tools Bazel installed, for
example rather than `npm install` (which depends on whatever
version you have installed on your machine), you can
`bazel run @io_bazel_rules_typescript_node//:bin/npm install`.
`bazel run @build_bazel_rules_typescript_node//:bin/npm install`.

Bazel accepts a lot of options. We check in some options in the
`.bazelrc` file. See the [bazelrc doc]. For example, if you don't
Expand Down
27 changes: 25 additions & 2 deletions npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "4.3.0",
"version": "5.0.0-beta.0",
"dependencies": {
"@types/angularjs": {
"version": "1.5.13-alpha"
Expand All @@ -21,7 +21,7 @@
"version": "1.10.21-alpha"
},
"@types/node": {
"version": "4.0.22-alpha"
"version": "6.0.84"
},
"@types/q": {
"version": "0.0.32"
Expand Down Expand Up @@ -177,6 +177,9 @@
"asap": {
"version": "2.0.3"
},
"ascli": {
"version": "1.0.1"
},
"asn1": {
"version": "0.2.3"
},
Expand Down Expand Up @@ -1479,6 +1482,9 @@
"builtin-modules": {
"version": "1.1.1"
},
"bytebuffer": {
"version": "5.0.1"
},
"bytes": {
"version": "2.1.0"
},
Expand Down Expand Up @@ -1597,6 +1603,9 @@
"colors": {
"version": "1.1.2"
},
"colour": {
"version": "0.7.1"
},
"combined-stream": {
"version": "1.0.5"
},
Expand Down Expand Up @@ -3500,6 +3509,9 @@
}
}
},
"long": {
"version": "3.2.0"
},
"longest": {
"version": "1.0.1"
},
Expand Down Expand Up @@ -3925,6 +3937,9 @@
"options": {
"version": "0.0.6"
},
"optjs": {
"version": "3.2.2"
},
"orchestrator": {
"version": "0.3.7",
"dependencies": {
Expand Down Expand Up @@ -4080,6 +4095,14 @@
}
}
},
"protobufjs": {
"version": "5.0.0",
"dependencies": {
"glob": {
"version": "5.0.15"
}
}
},
"protractor": {
"version": "4.0.14",
"dependencies": {
Expand Down
51 changes: 44 additions & 7 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/fs-extra": "0.0.22-alpha",
"@types/hammerjs": "^2.0.33",
"@types/jasmine": "^2.2.22-alpha",
"@types/node": "^4.0.22-alpha",
"@types/node": "^6.0.84",
"@types/selenium-webdriver": "^2.53.35",
"@types/systemjs": "^0.19.32",
"angular": "^1.5.0",
Expand Down Expand Up @@ -78,6 +78,7 @@
"nan": "^2.4.0",
"node-uuid": "1.4.x",
"parse5": "^3.0.1",
"protobufjs": "^5.0.0",
"protractor": "^4.0.14",
"react": "^0.14.0",
"rewire": "^2.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/BUILD → packages/common/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package(default_visibility=["//visibility:public"])
load("@io_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")

ts_library(
name = "common",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/BUILD → packages/core/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package(default_visibility=["//visibility:public"])
load("@io_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")

ts_library(
name = "core",
Expand Down

0 comments on commit 0317c4c

Please sign in to comment.