├── site
├── public
│ ├── stdlib.js
│ ├── docs
│ │ ├── stdlib.js
│ │ ├── index.js
│ │ ├── files
│ │ │ ├── 9964525a8aaf4f1e1a5a32685a8639c297ecdf0b7ac5f3093bc3c5709a560a2c
│ │ │ ├── eb75aeb7fd114a50db65b3763b2b35fd676c64d5eeba5fc7cc5f9eb4a2e1c60d
│ │ │ ├── e17d2fef09ef58173696facb5b9857b2669d954aeb0f1198011717529ee70b4c
│ │ │ ├── b70d3e71a1a87aaa614de9d5c309db8acfe1ffc9613f7384dd5dfe9e7b9bb691
│ │ │ ├── 8ac975167401d4a3f1a20fdb606e475370e4add5871446615974ab7a728e13e5
│ │ │ ├── e8e935a22713e8ea10bbbf6e17dab8c2742708c2abf8e021c136c918459592a0
│ │ │ ├── 2e23a9f910d8e8fff0ee5f32a30b464dd0a27dcc08e73282cd7f8f68d9a79349
│ │ │ ├── 5fe1038695da56b5248ee289dc2cf66fc4918ca97dfd7649e886a1bd931df3df
│ │ │ ├── 810bce42e9e40e466c2341a756f30bebf482f10c0cf230dce89893407391cf89
│ │ │ └── 7e2bc186f16000498c9227c6bd4055458bd74d7204e9dd8594d81d0ccf7587fd
│ │ ├── index.html
│ │ └── bc54548ebb381725e6d095ab3932e77a89d4cdfccb634ba18465f0358d5a8501.js
│ ├── examples
│ │ ├── census-api
│ │ │ ├── stdlib.js
│ │ │ ├── index.js
│ │ │ ├── index.html
│ │ │ ├── files
│ │ │ │ └── e54361c3e7be0df0f0b536e79d37e5d0ce58eccdb461006df04312ed1a8feadd
│ │ │ └── 645b0415e1030853bbc34781c1b23b6989a0bee79f978217f15eab1e73514c80.js
│ │ ├── github-api
│ │ │ ├── stdlib.js
│ │ │ ├── index.js
│ │ │ ├── index.html
│ │ │ ├── files
│ │ │ │ └── 22dbb963d472ebe6a9bc3201082b7e3e5a74ff3e40ab302ba9aecff68d25436f
│ │ │ └── 0b7ca4bb60e127b218d27d2d59e6f708d77da8fa16da661b77f587a262c8391c.js
│ │ └── wiki-pageviews
│ │ │ ├── stdlib.js
│ │ │ ├── index.js
│ │ │ ├── index.html
│ │ │ ├── files
│ │ │ └── 157de8e31dca7ade4cdb014615698b244f9e4b5da7d9346ab255abde595d580e
│ │ │ └── e9e128ada7176e897e2b52da0a123c594db2d80911b48bd4540baadfce3b3342.js
│ ├── index.js
│ ├── index.html
│ └── 147b7a769e856472cafb081301cb1f171d92f08e70bf38979365bb601cd37251.js
└── index.ojs
├── test
├── export
│ ├── data
│ │ ├── x
│ │ ├── y
│ │ └── sub
│ │ │ ├── f1
│ │ │ └── f2
│ ├── a.ojs
│ ├── b.ojs
│ ├── sub_with_fa.ojs
│ ├── ts-me.ojs
│ └── top.ojs
├── stress
│ └── stdlib.ojs
├── data
│ ├── a.txt
│ ├── b.txt
│ ├── c.txt
│ ├── x.txt
│ ├── y.txt
│ └── live.csv
├── imports
│ ├── suba.ojs
│ ├── subb.ojs
│ ├── subd-op.ojs
│ ├── subd.ojs
│ └── top.ojs
├── builtins
│ └── width.ojs
├── stdlib
│ ├── colors1.js
│ ├── colors2.js
│ ├── funcs.js
│ ├── funcs.ojs
│ ├── async.ojs
│ ├── colors.ojs
│ └── async.js
├── file-attachments
│ ├── sub.ojs
│ ├── normal.ojs
│ └── live.ojs
├── test-suite.ojs
├── secrets
│ └── normal.ojs
├── errors
│ └── parsing.ojs
├── standalone.ojs
└── design.ojs
├── examples
├── local
│ ├── filesize-update.sh
│ ├── data
│ │ └── filesize.txt
│ ├── filesize-live.ojs
│ ├── choropleth-live.ojs
│ ├── github-api.ojs
│ ├── wikipedia-pageviews.ojs
│ └── census-api.ojs
└── preact
│ ├── index.html
│ ├── a.ojs
│ ├── package.json
│ ├── App.jsx
│ ├── build.js
│ └── yarn.lock
├── CHANGELOG.md
├── src
├── utils.js
├── client
│ ├── core.js
│ ├── index.js
│ └── run.js
├── dataflow
├── content
│ └── index.html
├── compile.js
└── run.js
├── docs
├── secrets.md
├── importing.md
├── file-attachments.md
├── reference.md
├── quickstart.md
├── production.md
├── compiling.md
├── stdlib.md
├── shebang.md
└── site.ojs
├── LICENSE
├── TESTING.md
├── .gitignore
├── package.json
└── README.md
/site/public/stdlib.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/export/data/x:
--------------------------------------------------------------------------------
1 | XXX
--------------------------------------------------------------------------------
/test/export/data/y:
--------------------------------------------------------------------------------
1 | YYY
--------------------------------------------------------------------------------
/test/stress/stdlib.ojs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/site/public/docs/stdlib.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/data/a.txt:
--------------------------------------------------------------------------------
1 | AAAAAAAAAA
--------------------------------------------------------------------------------
/test/data/b.txt:
--------------------------------------------------------------------------------
1 | BBBBBBBBBB
--------------------------------------------------------------------------------
/test/data/c.txt:
--------------------------------------------------------------------------------
1 | CCCCCCCCCC
--------------------------------------------------------------------------------
/test/data/x.txt:
--------------------------------------------------------------------------------
1 | XXXXX
2 |
--------------------------------------------------------------------------------
/test/data/y.txt:
--------------------------------------------------------------------------------
1 | YYYYY
2 |
--------------------------------------------------------------------------------
/test/export/a.ojs:
--------------------------------------------------------------------------------
1 | a = 100;
2 |
--------------------------------------------------------------------------------
/test/export/b.ojs:
--------------------------------------------------------------------------------
1 | b = 200;
2 |
--------------------------------------------------------------------------------
/test/export/data/sub/f1:
--------------------------------------------------------------------------------
1 | file 1 bby
--------------------------------------------------------------------------------
/test/export/data/sub/f2:
--------------------------------------------------------------------------------
1 | f2 bbyyyyy
--------------------------------------------------------------------------------
/site/public/examples/census-api/stdlib.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/site/public/examples/github-api/stdlib.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/site/public/examples/wiki-pageviews/stdlib.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/imports/suba.ojs:
--------------------------------------------------------------------------------
1 | a = 3
2 |
3 | b = 3
4 |
5 | c = a - b
--------------------------------------------------------------------------------
/test/imports/subb.ojs:
--------------------------------------------------------------------------------
1 | a = 4;
2 |
3 | b = 4;
4 |
5 | c = a * b;
--------------------------------------------------------------------------------
/test/imports/subd-op.ojs:
--------------------------------------------------------------------------------
1 | function op(a, b){
2 | return a / b;
3 | }
--------------------------------------------------------------------------------
/test/builtins/width.ojs:
--------------------------------------------------------------------------------
1 | md`# Testing builtins: width`
2 |
3 | w = width;
4 |
5 | w, Date.now();
--------------------------------------------------------------------------------
/site/public/index.js:
--------------------------------------------------------------------------------
1 | export {default} from "./147b7a769e856472cafb081301cb1f171d92f08e70bf38979365bb601cd37251.js";
--------------------------------------------------------------------------------
/test/imports/subd.ojs:
--------------------------------------------------------------------------------
1 | import { op } from "./subd-op.ojs";
2 |
3 | a = 1;
4 |
5 | b = 2;
6 |
7 | c = op(a, b);
8 |
--------------------------------------------------------------------------------
/site/public/docs/index.js:
--------------------------------------------------------------------------------
1 | export {default} from "./bc54548ebb381725e6d095ab3932e77a89d4cdfccb634ba18465f0358d5a8501.js";
--------------------------------------------------------------------------------
/examples/local/filesize-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | find $1 -type f -exec wc -c {} + \
3 | > $(dirname "$0")/data/filesize.txt
--------------------------------------------------------------------------------
/site/public/examples/census-api/index.js:
--------------------------------------------------------------------------------
1 | export {default} from "./645b0415e1030853bbc34781c1b23b6989a0bee79f978217f15eab1e73514c80.js";
--------------------------------------------------------------------------------
/site/public/examples/github-api/index.js:
--------------------------------------------------------------------------------
1 | export {default} from "./0b7ca4bb60e127b218d27d2d59e6f708d77da8fa16da661b77f587a262c8391c.js";
--------------------------------------------------------------------------------
/site/public/examples/wiki-pageviews/index.js:
--------------------------------------------------------------------------------
1 | export {default} from "./e9e128ada7176e897e2b52da0a123c594db2d80911b48bd4540baadfce3b3342.js";
--------------------------------------------------------------------------------
/test/stdlib/colors1.js:
--------------------------------------------------------------------------------
1 | window.DATAFLOW_STDLIB = {
2 | constants: {
3 | red: "#ee2222",
4 | blue: "#1122ee",
5 | green: "#33ff33",
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/test/stdlib/colors2.js:
--------------------------------------------------------------------------------
1 | window.DATAFLOW_STDLIB = {
2 | constants: {
3 | red: "darkred",
4 | blue: "darkblue",
5 | green: "green",
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/test/stdlib/funcs.js:
--------------------------------------------------------------------------------
1 | window.DATAFLOW_STDLIB = {
2 | constants: {
3 | upper: () => (s) => s.toUpperCase(),
4 | lower: () => (s) => s.toLowerCase(),
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/test/file-attachments/sub.ojs:
--------------------------------------------------------------------------------
1 | /*
2 | FileAttachments:
3 | x: ../data/x.txt
4 | y: ../data/y.txt
5 | */
6 |
7 | x = FileAttachment("x");
8 |
9 | y = FileAttachment("y");
10 |
--------------------------------------------------------------------------------
/test/test-suite.ojs:
--------------------------------------------------------------------------------
1 | md`
2 | # Test Suite
3 | `;
4 |
5 | function equals(actual, expected) {
6 | if (actual !== expected) return html`
FAIL
`;
7 | return html`PASS
`;
8 | }
9 |
--------------------------------------------------------------------------------
/test/export/sub_with_fa.ojs:
--------------------------------------------------------------------------------
1 | /*
2 | FileAttachments:
3 | f1: ./data/sub/f1
4 | f2: ./data/sub/f2
5 | */
6 |
7 | f1 = FileAttachment("f1").text();
8 |
9 | f2 = FileAttachment("f2").text();
10 |
11 | content = f1 + f2;
12 |
--------------------------------------------------------------------------------
/test/export/ts-me.ojs:
--------------------------------------------------------------------------------
1 | md`
2 | ## omg dont appear
3 | `;
4 |
5 | one_cell = 4545;
6 |
7 | md`
8 | asdlfjasdlfkjad
9 | asd
10 | fa
11 | sdf
12 | asd
13 | fa
14 | d
15 | df
16 | `;
17 |
18 | function x(x) {
19 | return x;
20 | }
21 |
--------------------------------------------------------------------------------
/test/stdlib/funcs.ojs:
--------------------------------------------------------------------------------
1 | md`
2 | # Testing custom stdlib: functions
3 | `;
4 |
5 | md`
6 | ## Should be in uppercase
7 | `;
8 |
9 | upper("alex garcia");
10 |
11 | md`
12 | ## Should be in lowercase
13 | `;
14 |
15 | lower("ALEX GARCIA");
16 |
--------------------------------------------------------------------------------
/test/stdlib/async.ojs:
--------------------------------------------------------------------------------
1 | md`
2 | # Async stdlib testing
3 | `;
4 |
5 | md`
6 | This should be d5 version 5
7 | `;
8 |
9 | d3v5;
10 |
11 | d3v5.version;
12 |
13 | md`
14 | This should be d5 version 6
15 | `;
16 |
17 | d3v6;
18 |
19 | d3v6.version;
20 |
--------------------------------------------------------------------------------
/examples/preact/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/test/stdlib/colors.ojs:
--------------------------------------------------------------------------------
1 | md`
2 | # Testing custom stdlib: colors
3 | `;
4 |
5 | color = (color) =>
6 | html`
9 | ${color}
10 |
`;
11 |
12 | r = color(red);
13 |
14 | g = color(green);
15 |
16 | b = color(blue);
17 |
--------------------------------------------------------------------------------
/examples/local/data/filesize.txt:
--------------------------------------------------------------------------------
1 | 2920 ./src/dataflow
2 | 9787 ./src/run.js
3 | 3157 ./src/content/index.html
4 | 45385 ./src/content/core.js
5 | 176989 ./src/content/run.js
6 | 1329 ./src/client/core.js
7 | 9262 ./src/client/run.js
8 | 7718 ./src/client/index.js
9 | 8991 ./src/compile.js
10 | 265538 total
11 |
--------------------------------------------------------------------------------
/examples/preact/a.ojs:
--------------------------------------------------------------------------------
1 | //import { chart } from "https://observablehq.com/@d3/horizontal-bar-chart";
2 |
3 | a = 1;
4 |
5 | b = 2;
6 |
7 | c = a - b;
8 |
9 | d3 = require("d3");
10 |
11 | svg`