rules_rollup
v2.0.0
published 3 months ago
5 stars
7 forks
3 watchers
Apache License 2.0
public
1 assets
146,114 downloads
31 KB
Compatability level 1
xAYmgZaPXc084B4J5LpzZwwGR0SnBGIRdj4XyYq4OW4=
Maintained byAspect team
v2.0.0
August 15, 2024

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_rollup",
    sha256 = "c4062681968f5dcd3ce01e09e4ba73670c064744a7046211763e17c98ab8396e",
    strip_prefix = "rules_rollup-2.0.0",
    url = "https://github.com/aspect-build/rules_rollup/releases/download/v2.0.0/rules_rollup-v2.0.0.tar.gz",
)


######################
# rules_rollup setup #
######################
load("@aspect_rules_rollup//rollup:dependencies.bzl", "rules_rollup_dependencies")

# Fetches the rules_rollup dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
rules_rollup_dependencies()

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

# Fetch and register a node toolchain, if you haven't already

load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")

rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)

load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    npmrc = "//:.npmrc",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

Full Changelog: https://github.com/aspect-build/rules_rollup/compare/v1.0.3...v2.0.0

Deps:
Assets:

Bazel rules for rollup

This is a pure-starlark distribution which replaces the @bazel/rollup npm package. It's meant for use with aspect-build/rules_js, which has a pnpm-based layout for node_modules.

Installation

From the release you wish to use: https://github.com/aspect-build/rules_rollup/releases copy the WORKSPACE snippet into your WORKSPACE file.

Usage

See the API documentation and the example usage in the example folder. Note that the example also relies on code in the /WORKSPACE file in the root of this repo.