Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit 45a3934

Browse files
committed
switch to prettier
1 parent c052d6b commit 45a3934

24 files changed

+510
-4154
lines changed

.github/workflows/deploy.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Observable Dashboard to Cloudflare Pages
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
schedule:
77
- cron: "0 20 * * *"
88

@@ -19,28 +19,28 @@ jobs:
1919
environment: default
2020

2121
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v4
24-
25-
- name: Install Node.js
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: 20
29-
cache: npm
30-
31-
- name: Install dependencies
32-
run: npm ci
33-
34-
- name: Build project
35-
run: npm run build # Assumes your project has a build script in package.json
36-
env:
37-
API_TOKEN: ${{ secrets.API_TOKEN }}
38-
39-
- name: Deploy to Cloudflare Pages
40-
uses: cloudflare/pages-action@v1
41-
with:
42-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
43-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
44-
projectName: spark-dashboard # Replace with your Cloudflare Pages project name
45-
directory: ./dist # Replace with your output directory after build
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build project
35+
run: npm run build # Assumes your project has a build script in package.json
36+
env:
37+
API_TOKEN: ${{ secrets.API_TOKEN }}
38+
39+
- name: Deploy to Cloudflare Pages
40+
uses: cloudflare/pages-action@v1
41+
with:
42+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
43+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
44+
projectName: spark-dashboard # Replace with your Cloudflare Pages project name
45+
directory: ./dist # Replace with your output directory after build
4646

.github/workflows/test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212
environment: default
1313

1414
steps:
15-
- name: Check out repository
16-
uses: actions/checkout@v4
15+
- name: Check out repository
16+
uses: actions/checkout@v4
1717

18-
- name: Install Node.js
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version: 20
18+
- name: Install Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
2222

23-
- name: Install dependencies
24-
run: npm ci
23+
- name: Install dependencies
24+
run: npm ci
2525

26-
- name: Test project
27-
run: npm test
26+
- name: Test project
27+
run: npm test

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/.observablehq

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is an [Observable Framework](https://observablehq.com/framework) app runnin
44

55
## Development
66

7-
To start the local preview server, run:
7+
To start the local preview server, run:
88

99
```
1010
npm run dev
@@ -47,11 +47,11 @@ A typical Framework project looks like this:
4747

4848
## Command reference
4949

50-
| Command | Description |
51-
| ----------------- | -------------------------------------------------------- |
52-
| `npm install` | Install or reinstall dependencies |
53-
| `npm run dev` | Start local preview server |
54-
| `npm run build` | Build your static site, generating `./dist` |
55-
| `npm run deploy` | Deploy your app to Observable |
56-
| `npm run clean` | Clear the local data loader cache |
57-
| `npm run observable` | Run commands like `observable help` |
50+
| Command | Description |
51+
| -------------------- | ------------------------------------------- |
52+
| `npm install` | Install or reinstall dependencies |
53+
| `npm run dev` | Start local preview server |
54+
| `npm run build` | Build your static site, generating `./dist` |
55+
| `npm run deploy` | Deploy your app to Observable |
56+
| `npm run clean` | Clear the local data loader cache |
57+
| `npm run observable` | Run commands like `observable help` |

observablehq.config.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
import { jsonFetcher } from './src/data/json-fetcher.js'
2-
import { getDateXDaysAgo } from './src/utils/date-utils.js'
1+
import { jsonFetcher } from "./src/data/json-fetcher.js";
2+
import { getDateXDaysAgo } from "./src/utils/date-utils.js";
33

4-
const start = '2024-04-07'
5-
const end = getDateXDaysAgo(1)
4+
const start = "2024-04-07";
5+
const end = getDateXDaysAgo(1);
66

7-
const result = await jsonFetcher(`https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${start}&to=${end}`)
8-
const providerPaths = result.map(provider => `/provider/${provider.miner_id}`)
7+
const result = await jsonFetcher(
8+
`https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${start}&to=${end}`,
9+
);
10+
const providerPaths = result.map(
11+
(provider) => `/provider/${provider.miner_id}`,
12+
);
913

1014
// See https://observablehq.com/framework/config for documentation.
1115
export default {
1216
// The app’s title; used in the sidebar and webpage titles.
13-
title: 'spark-dash',
17+
title: "spark-dash",
1418

1519
// The pages and sections in the sidebar. If you don’t specify this option,
1620
// all pages will be listed in alphabetical order. Listing pages explicitly
@@ -29,10 +33,10 @@ export default {
2933
head: '<link rel="icon" href="media/spark-with-bbox.png" type="image/png" sizes="32x32"><script defer data-domain="dashboard.filspark.com" src="https://plausible.io/js/script.js"></script>',
3034

3135
// The path to the source root.
32-
root: 'src',
36+
root: "src",
3337

3438
// Some additional configuration options and their defaults:
35-
theme: 'dark', // try "light", "dark", "slate", etc.
39+
theme: "dark", // try "light", "dark", "slate", etc.
3640
// header: "", // what to show in the header (HTML)
3741
// footer: "Built with Observable.", // what to show in the footer (HTML)
3842
sidebar: false, // whether to show the sidebar
@@ -43,5 +47,5 @@ export default {
4347
// linkify: true, // convert URLs in Markdown to links
4448
// typographer: false, // smart quotes and other typographic improvements
4549
// cleanUrls: true, // drop .html from URLs
46-
dynamicPaths: providerPaths
47-
}
50+
dynamicPaths: providerPaths,
51+
};

0 commit comments

Comments
 (0)