blob: cf664244eb8ca9fd0f92cae1941a38b838f12843 [file] [log] [blame]
workspace(name = "examples_program")
# 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 = "build_bazel_rules_nodejs",
path = "../../dist/build_bazel_rules_nodejs/release",
)
load("@build_bazel_rules_nodejs//:defs.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(
node_version = "8.11.1",
package_json = ["//:package.json"],
yarn_version = "1.5.1",
)