To invoke all example runnable targets:
make run
To build:
bazelisk build //...
Note that run
and test
also build/rebuild whatever is needed.
Most external rules are wrapped at rules
folder, so they can be modified, refactored or simplified at will.
If an external rule is only used inside other rules/macros and not from BUILD
files, initially there's no need of wrapping them.
Each time dependencies change/get updated, run pnpm install
(toolchains use pnpm-lock.yaml
).
Note: The NodeJS & Typescript versions you should use are dictated by rules_js and rules_ts. You can see more details, and where to check which versions are available, if you inspect the WORKSPACE
file, I left some comments there.
Note: package.json
maximum versions are mandated from the toolchains. Check the WORKSPACE file for more details.
For pnpm
, alternatively can use the rules_js
provisioned one, e.g.:
bazelisk run @pnpm//:pnpm -- --dir $PWD outdated
But note that you'll need to instruct it extra configuration (runs from a sandbox).
- Bazel plugin for Visual Studio Code
- buildifier
- Add a
.bazelversion
if you wish to control which version to use
Run the Bazel way. Can run all the tests:
bazelisk test //...
Also created a make
target:
make test
Or filter by tags:
bazelisk test //... --test_tag_filters=js
All test flags/options are valid.
Tests are written using only NodeJS testing capabilities.
- List all output files from a label:
bazelisk cquery --output=files //src/js:a
bazelisk cquery --output=files //src/ts:c
- more query examples
- linting?
@bazel/ibazel
?