Skip to content

ashutilov/d3

Repository files navigation

d3-sandbox

Small D3 v7 playground built with Vite, TypeScript, and Vitest.

Node: 22.12+ (Vite 7 / ESLint 9; see engines in package.json). If you use mise, run mise install to use .mise.toml.

Scripts

Command Description
yarn dev Local dev server (default: http://localhost:5173)
yarn build Production build → dist/ (base: / for local preview)
yarn build:pages Build for GitHub Pages (base: /d3/; change in vite.config.ts if repo name differs)
yarn preview Serve dist/ at http://localhost:4173/ (use after yarn build)
yarn lint ESLint on .ts files
yarn lint:fix ESLint with --fix
yarn typecheck TypeScript (tsc --noEmit)
yarn test Vitest watch mode
yarn test:run Vitest single run (used in CI)

GitHub Pages

One-time setup in the repo on GitHub: Settings → Pages → Build and deployment → Source: choose GitHub Actions (not “Deploy from a branch”). Until that is set, pushes will not publish a site.

CI runs on pushes to main or master and uses yarn build:pages. The site URL is https://<user>.github.io/<repo>/ (e.g. if the repo is d3, keep pagesBase as /d3/ in vite.config.ts). You can also run the workflow manually: Actions → “Deploy to GitHub Pages” → Run workflow.

Layout

  • src/main.ts — app entry
  • data/ — typed sample datasets
  • public/assets/ — static assets (e.g. CSS)

Package manager: Yarn (lockfile: yarn.lock).

About

D3 library playground

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages