Skip to content

Commit

Permalink
upgrade WORKSPACE references, use index.bzl
Browse files Browse the repository at this point in the history
  • Loading branch information
mprobst committed Oct 1, 2019
1 parent c9c4c3d commit 3154073
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,26 @@ workspace(
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3b0116a8a91a75678a57ba676c246ac0fa9c90dc3d46daef305b11b54ed4467e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.33.1/rules_nodejs-0.33.1.tar.gz"],
sha256 = "1249a60f88e4c0a46d78de06be04d3d41e7421dcfa0c956de65309a7b7ecf6f4",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.38.0/rules_nodejs-0.38.0.tar.gz"],
)

load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "yarn_install")
yarn_install(
# Name this npm so that Bazel Label references look like @npm//package
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)

# Force developers to use the same Bazel version as CircleCI, to prevent different
# local behavior than CI.
check_bazel_version("0.28.0")

# Run yarn install to create a node_modules tree for Bazel's use
# In a future release, this will install into the dev's node_modules folder
# but for now, you must also run yarn install locally for the editor to find
# things like @types files
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
check_bazel_version("0.29.0")

# Install all Bazel dependencies needed for npm packages that supply Bazel rules
# In particular this installs the TypeScript rules
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")

install_bazel_dependencies()

load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")

load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()

0 comments on commit 3154073

Please sign in to comment.