Skip to content

Commit b1f0fc6

Browse files
committed
Updated README, CHANGELOG.
1 parent d9c71cc commit b1f0fc6

2 files changed

Lines changed: 35 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# Changelog
22

3+
## [v0.3.0] - 2021-02-16
4+
5+
### Added
6+
7+
- CLI `observable-prerender-open`, to open a given notebook in a Puppeteer browser for easier debugging.
8+
- CLI an alpha version of `observable-prerender-benchmark`, to benchmark a given notebook's cell execution time.
9+
- CLI programs now have `op-*` aliases cooresponding to `observable-prerender-*` programs.
10+
- `--format=html`, `--format=text`, `--format=json` options for `observable-prerender`.
11+
12+
## Changed
13+
14+
- CLI and Node library use `rw` instead of `fs`, allowing for easier `stdin`/`stdout` usage with `path="-"`.
15+
- Added `notebook.html(cell)` utility that returns the `.outerHTML` value of a given cell.
16+
- In `observable-prerender`, `--quiet` has been depracated in favor of `--verbose`, meaning progress logs are now opt-in.
17+
- `notebook.waitFor(cell)`'s 2nd parameter, `status`, has been deprecated. Now only waiting for a cell to become `fullfilled` is supported.
18+
319
## [v0.1.0] - 2020-08-07
420

521
### Added
622

723
- New CLI programs `observable-prerender` and `observable-prerender-animate`.
824
- `width`, `height`, and `headless` options to `load()`'s config parameter, for setting the width/height of a new Puppeteer browser, and for determining of that browser should be headless.
9-
- `notebook.fileAttachments`, for replacing Observable notebook FileAttachments with local files.
25+
- `notebook.fileAttachments`, for replacing Observable notebook FileAttachments with local files.

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ Although not required, a solid understanding of the Observable notebook runtime
142142

143143
### prerender.**load**(notebook, _targets_, _config_)
144144

145-
Load the given notebook into a page in a browser.
145+
Load the given notebook into a page in a browser.
146146

147-
- `notebook` <[string]> ID of the notebook on observablehq.com, like `@d3/bar-chart` or `@asg017/bitmoji`. For unlisted notebooks, be sure to include the `d/` prefix (e.g. `d/27a0b05d777304bd`).
147+
- `notebook` <[string]> ID of the notebook on observablehq.com, like `@d3/bar-chart` or `@asg017/bitmoji`. For unlisted notebooks, be sure to include the `d/` prefix (e.g. `d/27a0b05d777304bd`).
148148
- `targets` <[Array]<[string]>> array of cell names that will be evaluated. Every cell in `targets` (and the cells they depend on) will be evaluated and render to the page's DOM. If not supplied, then all cells (including anonymous ones) will be evaluated by default.
149149

150150
- `config` is an object with key/values for more control over how to load the notebook.
@@ -208,7 +208,6 @@ Pre-render the given notebook, iterate through the values of the `cellIterator`
208208

209209
Run `observable-prerender-animate --help` to get a full list of options.
210210

211-
212211
## Caveats
213212

214213
### Beta
@@ -226,3 +225,19 @@ You won't be able to make neat screencasts from all Observable notebooks. Puppet
226225
So what should you screenshot, exactly? It depends on your notebook. You probably need to have some counter/index/pointer that changes the graph when updated (see [scrubber](https://observablehq.com/@mbostock/scrubber)). You can programmatically redefine that cell using `notebook.redefine` in some loop, then screenshot the graph once the changes propagate (`notebook.waitFor`). But keep in mind, this may work for JS transitions, but CSS animations may not render properly or in time, so it really depends on how you built your notebook. it's super hard to get it right without some real digging.
227226

228227
If you run into any issues getting frames for a animation, feel free to open an issue!
228+
229+
## "Benchmarking"
230+
231+
In this project, "Benchmarking" can refer to three different things: the `op-benchmark` CLI tool, internal benchmarks for the package, and external benchmarks for comparing against other embedding options.
232+
233+
### `op-benchmark` for Benchmarking Notebooks
234+
235+
`op-benchmark` is a CLI tool bundled with `observable-prerender` that measures how long every cell's execution time for a given notebook. It's meant to be used by anyone to test their own notebooks, and is part of the `observable-prerender` suite of tools.
236+
237+
### Internal Benchmarking
238+
239+
`/benchmark-internal` is a series of tests performed against `observable-prerender` to ensure `observable-prerender` runs as fast as possible, and that new changes to drastically effect the performace of the tool. This is meant to be used by `observable-prerender` developers, not by users of the `observable-prerender` tool.
240+
241+
#### External Benchmarking
242+
243+
`/benchmark-external` contains serveral tests to compare `observable-prerender` with other Observable notebook embeding options. A common use-case for `observable-prerender` is to pre-render Observable notebooks for faster performance for end users, so these tests are to ensure and measure how much faster `observable-prerender` actually is. This is meant for `observable-prerender` developers, not for general users.

0 commit comments

Comments
 (0)