Skip to content

Commit

Permalink
Merge branch 'mbostock/parameterized' into mbostock/page-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 26, 2024
2 parents 6139567 + cd5df5e commit 86df938
Show file tree
Hide file tree
Showing 66 changed files with 85 additions and 92 deletions.
3 changes: 0 additions & 3 deletions docs/css/card.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/css/color.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/css/grid.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/css/note.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ volcano

## Static analysis

The `FileAttachment` function can _only_ be passed a static string literal; constructing a dynamic path such as `FileAttachment("my" + "file.csv")` is invalid syntax. Static analysis is used to invoke [data loaders](./loaders) at build time, and ensures that only referenced files are included in the generated output during build. This also allows a content hash in the file name for cache breaking during deploy.
The `FileAttachment` function can _only_ be passed a static string literal; constructing a dynamic path such as <code>FileAttachment(\`frame$\{i}.png\`)</code> is invalid syntax. Static analysis is used to invoke [data loaders](./loaders) at build time, and ensures that only referenced files are included in the generated output during build. This also allows a content hash in the file name for cache breaking during deploy.

If you have multiple files, you can enumerate them explicitly like so:

Expand Down
3 changes: 0 additions & 3 deletions docs/javascript/display.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/files.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/generators.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/imports.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/inputs.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/mutables.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/promises.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/javascript/reactivity.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/lib/generators.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
keywords: [dark, width]
---

# Observable Generators

The Observable standard library includes several generator utilities. These are available by default in Markdown as `Generators`, but you can import them explicitly:
Expand Down
3 changes: 0 additions & 3 deletions docs/routing.md

This file was deleted.

6 changes: 5 additions & 1 deletion docs/themes.md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ function renderThemeSection(themes: readonly string[]): string {
}

export default function render(): string {
return `# Themes
return `---
keywords: [light, dark]
---
# Themes
<style>
Expand Down
2 changes: 1 addition & 1 deletion examples/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/chess/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/codemirror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-input-2d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-stylesheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/eia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/geotiff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/hotel-bookings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/input-select-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/intersection-observer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-airtable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-arrow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-canvas-to-png/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-census/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-databricks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-duckdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-elasticsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-julia-to-txt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-parquet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-postgres/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-python-to-csv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-python-to-parquet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-python-to-png/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-python-to-zip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-r-to-csv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-r-to-jpeg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-r-to-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-r-to-zip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-rust-to-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/loader-snowflake/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
2 changes: 1 addition & 1 deletion examples/markdown-it-container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"clean": "rimraf src/.observablehq/cache",
"build": "rimraf dist && observable build",
"build": "observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
Expand Down
Loading

0 comments on commit 86df938

Please sign in to comment.