Skip to content

rename to “Framework”; new Getting started tutorial #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8790ba4
getting started tutorial
mbostock Jan 24, 2024
f1ffae3
framework
mbostock Jan 23, 2024
10e33ab
rewrite imports
mbostock Jan 25, 2024
5b9b2d8
new cards
mbostock Jan 25, 2024
b9b379b
edits
mbostock Jan 25, 2024
258af30
Merge branch 'main' into mbostock/framework
mbostock Jan 25, 2024
d736ffe
checkpoint
mbostock Jan 25, 2024
6a94278
Apply suggestions from code review
mbostock Jan 25, 2024
60b73fd
suppress experimental warnings
mbostock Jan 25, 2024
074fce5
remove cards, update copy
mbostock Jan 25, 2024
6e96b38
getting started, cont.
mbostock Jan 25, 2024
d02b26b
fix footer margin
mbostock Jan 26, 2024
0ac0195
tweak copy
mbostock Jan 26, 2024
e16c166
weather example
mbostock Jan 26, 2024
627ec76
Merge branch 'main' into mbostock/framework
mbostock Jan 28, 2024
c7170ab
Merge branch 'main' into mbostock/framework
mbostock Jan 29, 2024
edded18
revert weather example
mbostock Jan 29, 2024
96f8fb7
Merge branch 'main' into mbostock/framework
mbostock Jan 29, 2024
34d38c3
Merge branch 'main' into mbostock/framework
mbostock Jan 29, 2024
8d6668a
Merge branch 'main' into mbostock/framework
mbostock Jan 29, 2024
906d9cc
clack prompts
mbostock Jan 29, 2024
52b4149
tweaks
mbostock Jan 29, 2024
1891cba
Merge branch 'main' into mbostock/framework
mbostock Jan 30, 2024
f9841b7
better index page
mbostock Jan 30, 2024
3180164
prompt for title
mbostock Jan 30, 2024
604a276
Merge branch 'main' into mbostock/framework
mbostock Jan 30, 2024
2a4d204
fix create-test
mbostock Jan 30, 2024
f5f6152
getting started, cont.
mbostock Jan 30, 2024
810160c
fix #635; untildify
mbostock Jan 31, 2024
bb2a137
getting started, cont.
mbostock Jan 31, 2024
2fdbb8a
getting started, cont.
mbostock Jan 31, 2024
7273ee6
add python example
mbostock Jan 31, 2024
ccd569e
remove width
mbostock Jan 31, 2024
70ca62e
fix #157; debounce empty files
mbostock Jan 31, 2024
47e8a3a
notes
mbostock Jan 31, 2024
7571594
remove log; shorten debounce
mbostock Jan 31, 2024
9193c16
wording
mbostock Jan 31, 2024
8fb5c34
less joy; early access note
mbostock Jan 31, 2024
77e4f69
Merge branch 'main' into mbostock/framework
mbostock Jan 31, 2024
a651eed
tweak wording
mbostock Feb 1, 2024
8a4ff2d
Apply suggestions from code review
mbostock Feb 1, 2024
c089276
more edits
mbostock Feb 1, 2024
f58073b
getting started, cont.
mbostock Feb 1, 2024
819f4ea
more edits
mbostock Feb 1, 2024
b69baec
Merge branch 'main' into mbostock/framework
mbostock Feb 1, 2024
93b1c39
downcase forum
mbostock Feb 1, 2024
4171efa
data-copy=none; fix pre max-width
mbostock Feb 1, 2024
1c48625
npm and Yarn
mbostock Feb 1, 2024
7800a3d
kill all pilcrows
mbostock Feb 1, 2024
5f15fab
convert to webp
mbostock Feb 1, 2024
7aedabe
semantic hero
mbostock Feb 1, 2024
d5000c1
semantic hero for template
mbostock Feb 1, 2024
4c0a4a9
Update docs/getting-started.md
mbostock Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Observable CLI
# Observable Framework

- [Documentation](https://cli.observablehq.com/)
- [Issues](https://github.com/observablehq/cli/issues)
4 changes: 2 additions & 2 deletions docs/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You don’t have to start from scratch: components are reusable pieces of code (functions, themes, snippets, etc.) that make it quicker to update page layout and appearance, and add common page content.

The Observable CLI offers three flavors of components: [layout helpers](#layout-helpers), [Observable Plot snippets](#observable-plot-snippets), and [Observable Inputs](#observable-inputs).
Observable Framework offers three flavors of components: [layout helpers](#layout-helpers), [Observable Plot snippets](#observable-plot-snippets), and [Observable Inputs](#observable-inputs).

## Layout helpers

Expand Down Expand Up @@ -140,4 +140,4 @@ The [radio input](./inputs/radio) prompts a user to select a penguin species:
const pickSpecies = view(Inputs.radio(["Adelie", "Chinstrap", "Gentoo"], {value: "Gentoo", label: "Penguin species:"}))
```

The value of `pickSpecies` (<tt>="${pickSpecies}"</tt>) can then be accessed elsewhere in the page, as a parameter in other computations, and to create interactive charts, tables or text with [inline expressions](./javascript#inline-expressions).
The value of `pickSpecies` (<code>="${pickSpecies}"</code>) can then be accessed elsewhere in the page, as a parameter in other computations, and to create interactive charts, tables or text with [inline expressions](./javascript#inline-expressions).
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

If you’d like to contribute to the Observable CLI, here’s how. First clone the [git repo](https://github.com/observablehq/cli) and run [Yarn (1.x)](https://classic.yarnpkg.com/lang/en/docs/install/) to install dependencies:
If you’d like to contribute to Observable Framework, here’s how. First clone the [git repo](https://github.com/observablehq/cli) and run [Yarn (1.x)](https://classic.yarnpkg.com/lang/en/docs/install/) to install dependencies:

```sh
git clone [email protected]:observablehq/cli.git
Expand Down Expand Up @@ -30,7 +30,7 @@ This creates the `dist` folder. View the site using your preferred web server, s
http-server dist
```

This documentation site is built on GitHub using the Observable CLI; see the [deploy workflow](https://github.com/observablehq/cli/blob/main/.github/workflows/deploy.yml). Please open a pull request if you’d like to contribute to the documentation or to CLI features. Contributors are expected to follow our [code of conduct](https://github.com/observablehq/.github/blob/master/CODE_OF_CONDUCT.md). 🙏
This documentation site is built on GitHub using Observable Framework; see the [deploy workflow](https://github.com/observablehq/cli/blob/main/.github/workflows/deploy.yml). Please open a pull request if you’d like to contribute. Contributors are expected to follow our [code of conduct](https://github.com/observablehq/.github/blob/master/CODE_OF_CONDUCT.md). 🙏

A test coverage report can be generated with [c8](https://github.com/bcoe/c8), in text and lcov formats, to help you identify which lines of code are not (yet!) covered by tests. Just run:

Expand All @@ -42,7 +42,7 @@ yarn test:coverage

<div class="note">These instructions are intended for Observable staff.</div>

To release a new version of the CLI, first update the [package.json](https://github.com/observablehq/cli/blob/main/package.json) file by following the standard process for committing code changes:
To release a new version, first update the [package.json](https://github.com/observablehq/cli/blob/main/package.json) file by following the standard process for committing code changes:

1. Create a new branch.
2. Edit the `version` field in the [package.json](https://github.com/observablehq/cli/blob/main/package.json) file as desired.
Expand Down
13 changes: 13 additions & 0 deletions docs/data/forecast.json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const longitude = -122.47;
const latitude = 37.80;

async function json(url) {
const response = await fetch(url);
if (!response.ok) throw new Error(`fetch failed: ${response.status}`);
return await response.json();
}

const station = await json(`https://api.weather.gov/points/${latitude},${longitude}`);
const forecast = await json(station.properties.forecastHourly);

process.stdout.write(JSON.stringify(forecast));
11 changes: 11 additions & 0 deletions docs/data/forecast.json.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import json
import requests
import sys

longitude = -122.47
latitude = 37.80

station = requests.get(f"https://api.weather.gov/points/{latitude},{longitude}").json()
forecast = requests.get(station["properties"]["forecastHourly"]).json()

json.dump(forecast, sys.stdout)
Loading