Skip to content

Commit 453dbfc

Browse files
committed
updating build configuration so it works on arm64 (e.g. M1 macs) and also the readme to use the "bazelisk" launcher
1 parent 75b58cf commit 453dbfc

File tree

3 files changed

+91
-88
lines changed

3 files changed

+91
-88
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,30 @@ The cons objects have a `toString` method which converts it into a pretty-print
3434

3535
For a build to run tests:
3636

37-
1. make sure npm and bazel are installed
37+
1. make sure npm is installed, then:
3838
2. ```npm install```
39-
3. ```bazel build algebrite```
39+
3. ```bazelisk build algebrite```
4040

41+
(```bazelisk``` is the launcher for the ```bazel``` build system). The bazel build system tends to be smart and cache things. You can do a thorough clean by:
4142

42-
The bazel build system tends to be smart and cache things. You can do a thorough clean by:
43-
```bazel clean; rm -rf ./dist/*```
43+
```bazelisk clean; rm -rf ./dist/*```
4444

4545
The so called "npm build" does a build for npm and browser:
4646

47-
1. make sure npm is installed
48-
2. make sure bazel is installed
49-
3. ```bazel build npm```
47+
1. make sure npm is installed, then:
48+
2. ```npm install``` (if you didn't run this already)
49+
3. ```bazelisk build npm```
5050
4. open ```index.html```
5151

5252
# How to test
5353

5454
For full tests:
5555

56-
```bazel test :all```
56+
```bazelisk test :all```
5757

5858
or, if caches get in the way:
5959

60-
```bazel test :all --cache_test_results=no```
60+
```bazelisk test :all --cache_test_results=no```
6161

6262

6363
# Contribute

WORKSPACE.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ npm_install(
3434
load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
3535

3636
esbuild_repositories(npm_repository = "npm")
37+
38+
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
39+
40+
# M1 Macs require Node 16+
41+
node_repositories(
42+
package_json = ["//:package.json"],
43+
node_version = "16.6.2",
44+
)

package-lock.json

Lines changed: 74 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)