Skip to content

Commit

Permalink
Provide build script. Fixes #122.
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Jan 7, 2024
1 parent 3be2062 commit a83734f
Show file tree
Hide file tree
Showing 3 changed files with 1,070 additions and 1,037 deletions.
15 changes: 13 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@ QUIZ_DEV_MODE = "yes"
script = "mdbook serve --open"

[tasks.watch-js]
script = "cd js-extensions && pnpm watch"
script = "pnpm watch"
cwd = "js-extensions"

[tasks.watch.run_task]
name = ["watch-book", "watch-js"]
parallel = true
parallel = true

[tasks.build-js]
script = "pnpm init-repo"
cwd = "js-extensions"

[tasks.build-mdbook]
script = "mdbook build"

[tasks.build]
dependencies = ["build-js", "build-mdbook"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ Finally, you need [pnpm](https://pnpm.io/installation).

## Building

### With cargo-make

If you have [`cargo-make`] installed, then run:

```bash
$ cargo make install
```

### Without cargo-make

First, build the Javascript extensions.

```bash
Expand All @@ -60,6 +70,8 @@ Then to build the book, type:
$ mdbook build
```

### Output

The output will be in the `book` subdirectory. To check it out, open it in
your web browser.

Expand Down Expand Up @@ -122,3 +134,5 @@ which is provided in `ci/dictionary.txt`. If the script produces a false
positive (say, you used word `BTreeMap` which the script considers invalid),
you need to add this word to `ci/dictionary.txt` (keep the sorted order for
consistency).

[`cargo-make`]: https://github.com/sagiegurari/cargo-make
Loading

0 comments on commit a83734f

Please sign in to comment.