Overview
Bazel

Overview

Check Bazel version

Macros

check_bazel_version

Verify the users Bazel version is at least the given one.

Run history-server

Macros

history_server

This is a simple Bazel wrapper around the history-server npm package.

Run http-server

Macros

http_server

This is a simple Bazel wrapper around the http-server npm package.

NodeJS testing

Macros

jasmine_node_test

Runs tests in NodeJS using the Jasmine test runner.

Executing programs

Rules

nodejs_binary

Runs some JavaScript code in NodeJS.

nodejs_test

Identical to nodejs_binary, except this can be used with bazel test as well. When the binary returns zero exit code, the test passes; otherwise it fails.

Macros

nodejs_binary_macro

This macro exists only to wrap the nodejs_binary as an .exe for Windows.

nodejs_test_macro

This macro exists only to wrap the nodejs_test as an .exe for Windows.

Install NodeJS & Yarn

Macros

node_repositories

To be run in user's WORKSPACE to install rules_nodejs dependencies.

Install npm packages

Repository Rules

npm_install

Runs npm install during workspace setup.

yarn_install

Runs yarn install during workspace setup.

npm packaging

Rules

npm_package

The npm_package rule creates a directory containing a publishable npm artifact.

Macros

create_package

Creates an action that produces the npm package.

Rollup bundling

Rules

rollup_bundle

Produces several bundled JavaScript files using Rollup and Uglify.

Macros

write_rollup_config

Generate a rollup config file.

run_rollup

Creates an Action that can run rollup on set of sources.

run_uglify

Runs uglify on an input file.

run_sourcemapexplorer

Runs source-map-explorer to produce an HTML visualization of the sourcemap.