Skip to content

Commit 19b8103

Browse files
authored
add hightable-demo (#39)
* move the app to apps/cli/ * fix ci * try to fix the CI * add hightable-demo * clearer titles * add missing favicon and update README also: use eslint configuration recommended by vite
1 parent 3b159f3 commit 19b8103

19 files changed

+541
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: CI in the cli app
1+
name: apps/cli
22
on:
33
push:
44
paths:
55
- 'packages/components/**'
66
- 'apps/cli/**'
7-
- '.github/workflows/ci_cli.yml'
7+
- '.github/workflows/ci_apps_cli.yml'
88

99
defaults:
1010
run:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: apps/hightable-demo
2+
on:
3+
push:
4+
paths:
5+
- 'apps/hightable-demo/**'
6+
- '.github/workflows/ci_apps_hightable_demo.yml'
7+
8+
defaults:
9+
run:
10+
working-directory: ./apps/hightable-demo
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: npm i
18+
- run: npm run lint
19+
20+
typecheck:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- run: npm i
25+
- run: tsc
26+
27+
buildcheck:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- run: npm i
32+
- run: npm run build

.github/workflows/ci_components.yml renamed to .github/workflows/ci_packages_components.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: CI in the components package
1+
name: packages/components
22
on:
33
push:
44
paths:
55
- 'packages/components/**'
6-
- '.github/workflows/ci_components.yml'
6+
- '.github/workflows/ci_packages_components.yml'
77

88
defaults:
99
run:

apps/hightable-demo/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

apps/hightable-demo/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# HighTable demo
2+
3+
This is an example project showing how to use [hightable](https://github.com/hyparam/hightable).
4+
5+
## Build
6+
7+
```bash
8+
cd apps/hightable-demo
9+
npm i
10+
npm run build
11+
```
12+
13+
The build artifacts will be stored in the `dist/` directory and can be served using any static server, eg. `http-server`:
14+
15+
```bash
16+
npm i -g http-server
17+
http-server dist/
18+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import js from '@eslint/js'
2+
import react from 'eslint-plugin-react'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import globals from 'globals'
6+
import tseslint from 'typescript-eslint'
7+
8+
export default tseslint.config(
9+
{ ignores: ['dist'] },
10+
{
11+
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
12+
// Set the react version
13+
settings: { react: { version: '18.3' } },
14+
files: ['src/**/*.{ts,tsx}'],
15+
languageOptions: {
16+
ecmaVersion: 2020,
17+
globals: globals.browser,
18+
parserOptions: {
19+
project: './tsconfig.json',
20+
tsconfigRootDir: import.meta.dirname,
21+
},
22+
},
23+
plugins: {
24+
react,
25+
'react-hooks': reactHooks,
26+
'react-refresh': reactRefresh,
27+
},
28+
rules: {
29+
...reactHooks.configs.recommended.rules,
30+
'react-refresh/only-export-components': [
31+
'warn',
32+
{ allowConstantExport: true },
33+
],
34+
...react.configs.recommended.rules,
35+
...react.configs['jsx-runtime'].rules,
36+
37+
'@typescript-eslint/restrict-template-expressions': 'off',
38+
},
39+
},
40+
)

apps/hightable-demo/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>HighTable Viewer Demo</title>
6+
<link rel="icon" type="image/svg+xml" href="favicon.png" />
7+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Mulish:wght@300;600&display=swap"/>
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
9+
</head>
10+
<body>
11+
<nav>
12+
<a class="brand" href='https://hyparam.github.io/hightable/'>
13+
HighTable
14+
</a>
15+
</nav>
16+
<div id="app"></div>
17+
<script type="module" src="/src/main.tsx"></script>
18+
</body>
19+
</html>

apps/hightable-demo/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "hightable-demo",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"hightable": "0.7.0",
14+
"react": "^18.3.1",
15+
"react-dom": "^18.3.1"
16+
},
17+
"devDependencies": {
18+
"@eslint/js": "^9.13.0",
19+
"@types/react": "^18.3.12",
20+
"@types/react-dom": "^18.3.1",
21+
"@vitejs/plugin-react": "^4.3.3",
22+
"eslint": "^9.13.0",
23+
"eslint-plugin-react": "^7.37.2",
24+
"eslint-plugin-react-hooks": "^5.0.0",
25+
"eslint-plugin-react-refresh": "^0.4.14",
26+
"globals": "^15.11.0",
27+
"typescript": "~5.6.2",
28+
"typescript-eslint": "^8.11.0",
29+
"vite": "^5.4.10"
30+
}
31+
}
1.04 KB
Loading

0 commit comments

Comments
 (0)