blob: d7108ea97d472af8e685d654c1211f8c6502d769 [file]
workspace(name = "examples_user_managed_deps")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "9901bc17138a79135048fb0c107ee7a56e91815ec6594c08cb9a17b80276d62b",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.40.0/rules_nodejs-0.40.0.tar.gz"],
)
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dev_dependencies")
rules_nodejs_dev_dependencies()
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
# Install a hermetic version of node.
# After this is run, these labels will be available:
# - NodeJS:
# @nodejs//:node
# - NPM:
# @nodejs//:npm
# - The yarn package manager:
# @nodejs//:yarn
#
# To install the node_modules of all the listed package_json files run:
# bazel run @nodejs//:yarn
# or
# bazel run @nodejs//:npm
node_repositories(
package_json = ["//:package.json"],
)
# In your code, you'd fetch this repository with an `http_archive` call.
# We do this local repository only because this example lives in the same
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "npm_bazel_jasmine",
path = "../../packages/jasmine/src",
)
# http_archive(
# name = "npm_bazel_jasmine",
# urls = ["https://github.com/bazelbuild/rules_nodejs/archive/x.x.x.tar.gz"],
# strip_prefix = "rules_nodejs-x.x.x/packages/jasmine/src",
# )