Skip to content

Commit a2aae52

Browse files
committed
docs: fast examples
1 parent 2df1f08 commit a2aae52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2728
-170
lines changed

.github/workflows/website.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ jobs:
3636
- name: Install website dependencies
3737
run: pnpm install
3838
working-directory: ./website
39+
- name: Install sandbox dependencies
40+
run: pnpm install
41+
working-directory: ./sandboxes
42+
- name: Build sandboxes
43+
run: pnpm build
44+
working-directory: ./sandboxes
45+
- name: Copy sandbox examples to website
46+
run: node sandboxes.js
47+
working-directory: ./website
3948
- name: Build website
4049
run: pnpm build
4150
working-directory: ./website

sandboxes/bar/grouped/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<script type="module" defer src="./index.tsx"></script>
7+
<style>
8+
html, body {
9+
margin: 0;
10+
}
11+
12+
#root {
13+
max-width: 800px;
14+
max-height: 100vh;
15+
margin: 0 auto;
16+
display: flex;
17+
align-items: center;
18+
justify-content: center;
19+
}
20+
</style>
721
</head>
822
<body>
923
<div id="root"></div>

sandboxes/bar/grouped/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"type": "module",
33
"scripts": {
4-
"start": "vite"
4+
"start": "vite",
5+
"build": "vite build"
56
},
67
"dependencies": {
78
"chart.js": "^4.0.0",

sandboxes/bar/grouped/vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'vite';
22
import react from '@vitejs/plugin-react';
33

44
export default defineConfig({
5+
base: './',
56
plugins: [react()],
67
});

sandboxes/bar/horizontal/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<script type="module" defer src="./index.tsx"></script>
7+
<style>
8+
html, body {
9+
margin: 0;
10+
}
11+
12+
#root {
13+
max-width: 800px;
14+
max-height: 100vh;
15+
margin: 0 auto;
16+
display: flex;
17+
align-items: center;
18+
justify-content: center;
19+
}
20+
</style>
721
</head>
822
<body>
923
<div id="root"></div>

sandboxes/bar/horizontal/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"type": "module",
33
"scripts": {
4-
"start": "vite"
4+
"start": "vite",
5+
"build": "vite build"
56
},
67
"dependencies": {
78
"chart.js": "^4.0.0",

sandboxes/bar/horizontal/vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'vite';
22
import react from '@vitejs/plugin-react';
33

44
export default defineConfig({
5+
base: './',
56
plugins: [react()],
67
});

sandboxes/bar/stacked/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<script type="module" defer src="./index.tsx"></script>
7+
<style>
8+
html, body {
9+
margin: 0;
10+
}
11+
12+
#root {
13+
max-width: 800px;
14+
max-height: 100vh;
15+
margin: 0 auto;
16+
display: flex;
17+
align-items: center;
18+
justify-content: center;
19+
}
20+
</style>
721
</head>
822
<body>
923
<div id="root"></div>

sandboxes/bar/stacked/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"type": "module",
33
"scripts": {
4-
"start": "vite"
4+
"start": "vite",
5+
"build": "vite build"
56
},
67
"dependencies": {
78
"chart.js": "^4.0.0",

sandboxes/bar/stacked/vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'vite';
22
import react from '@vitejs/plugin-react';
33

44
export default defineConfig({
5+
base: './',
56
plugins: [react()],
67
});

0 commit comments

Comments
 (0)