Start Leaflet easily.
- Leaflet v1.9.4
- TypeScript v7.0.2
- Vite v8.1.5
- node v24.4.1
- pnpm v11.9.0
Install package (pnpm is pinned via the packageManager field — run corepack enable once if you don't have pnpm)
pnpm installbuild
pnpm run builddev
pnpm run devtest (builds first — Playwright runs against vite preview of dist/)
pnpm testThe visual test is a separate command because it compares against a local baseline that is intentionally not committed — create it once, then compare:
pnpm run test:visual:update
pnpm run test:visualFirst time only: pnpm exec playwright install chromium.
dist/— local build output (gitignored)img/— images used by this READMEe2e/screenshots/before.png/after.png— pre- and post-update map renders, refreshed by the deps workflow and embedded side by side in the update PR body;after.pngshows an image diff under Files changed only when rendering actually changed- CI (
.github/workflows/ci.yml) builds and runs the Playwright smoke test on every PR and push to main - GitHub Pages (
.github/workflows/pages.yml) rebuilds the demo from source and redeploys it after CI succeeds on main — a commit that fails CI is never published, and no build output is committed - A daily workflow (
.github/workflows/deps-autoupdate.yml) bumps leaflet/typescript/vite behind build + e2e gates and opens a PR; when every check passes, auto-merge is armed and GitHub merges the PR once CI passes on it (which tags and publishes a GitHub Release), and Slack is notified of the result either way — on any failure nothing is merged. The package version follows the bundled Leaflet version (hence1.9.4); non-Leaflet updates increment a fourth segment instead (e.g.1.9.4.1).
MIT
Copyright (c) 2018-2026 Yasunori Kirimoto
Leafletを手軽に始める
- Leaflet v1.9.4
- TypeScript v7.0.2
- Vite v8.1.5
- node v24.4.1
- pnpm v11.9.0
パッケージインストール(pnpm のバージョンは packageManager フィールドで固定されています。pnpm が未導入なら corepack enable を一度実行してください)
pnpm installビルド
pnpm run build開発
pnpm run devテスト(ビルドも実行されます — Playwright は dist/ を配信する vite preview に対して実行されます)
pnpm testビジュアルテストは、意図的にコミットしていないローカルのベースライン画像と比較するため別コマンドです。初回に作成してから比較してください。
pnpm run test:visual:update
pnpm run test:visual初回のみ pnpm exec playwright install chromium も必要です。
dist/— ローカルビルド出力(gitignore 対象)img/— この README 用の画像e2e/screenshots/before.png/after.png— 更新前後の地図レンダリング。依存更新ワークフローが毎回更新し、PR 本文に並べて埋め込みます。描画が実際に変わったときだけafter.pngの画像差分が Files changed に現れます- CI(
.github/workflows/ci.yml)が PR と main への push ごとにビルドと Playwright スモークテストを実行 - GitHub Pages(
.github/workflows/pages.yml)が main の CI 成功後にソースからデモを再ビルドして再デプロイ — CI に失敗したコミットは公開されず、ビルド成果物もコミットしません - 日次ワークフロー(
.github/workflows/deps-autoupdate.yml)が leaflet/typescript/vite をビルド + e2e のゲート付きで更新し PR を作成。すべてのチェックに合格すると自動マージが予約され、PR 上の CI 合格をもって GitHub がマージします(タグ付けと GitHub Release も自動)。結果は成功・失敗を問わず Slack に通知され、エラー時はマージされません。パッケージのバージョンは同梱の Leaflet バージョンに追従し(そのため1.9.4)、Leaflet 以外のみの更新では4桁目を増分します(例:1.9.4.1)。
MIT
Copyright (c) 2018-2026 Yasunori Kirimoto


