Skip to content

Repository files navigation

leaflet-starter

README02

Start Leaflet easily.


Usage

README03


Install package (pnpm is pinned via the packageManager field — run corepack enable once if you don't have pnpm)

pnpm install

build

pnpm run build

dev

pnpm run dev

test (builds first — Playwright runs against vite preview of dist/)

pnpm test

The 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:visual

First time only: pnpm exec playwright install chromium.




README01


Repository layout & automation

  • dist/ — local build output (gitignored)
  • img/ — images used by this README
  • e2e/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.png shows 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 (hence 1.9.4); non-Leaflet updates increment a fourth segment instead (e.g. 1.9.4.1).

License

MIT

Copyright (c) 2018-2026 Yasunori Kirimoto




Japanese


Leaflet スターター

README02

Leafletを手軽に始める


使用方法

README03


パッケージインストール(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 も必要です。



README01


リポジトリ構成と自動化

  • 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


About

Start Leaflet easily. [Leaflet, Vite]

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages