From 4cc76906ddc6c8c9229c779116fa2cd206010ac7 Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Thu, 17 Sep 2026 10:43:11 +0100 Subject: [PATCH 1/2] docs: add MIT licence and contributing guide --- CONTRIBUTING.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 21 ++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..36bec56 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing + +Map Printer exports print-resolution PNGs of a map area entirely in the +browser. It is a static site (Vite + TypeScript, Lit + Tailwind, maplibre-gl). + +## Getting set up + +You'll need Node 22. Then: + +```bash +npm install +npm run dev +``` + +This starts the Vite dev server. + +## Where things live + +Each module lives under `src/lib//`, with `index.ts` as its only public +surface — nothing outside the module should import from anything else inside +it. Each module's contract (what it takes, what it returns, its invariants) +is documented in `docs/architecture.md`. UI code lives in `src/`. + +## Before opening a PR + +Run: + +```bash +npm run typecheck +npm test # Vitest unit tests, alongside the code as src/lib/**/*.test.ts +``` + +Browser-only modules are covered by Playwright e2e tests in `e2e/`. Install +the browsers once with `npm run test:e2e:install`, then run them with: + +```bash +npm run test:e2e +``` + +CI runs typecheck, unit tests, build, and the chromium + webkit e2e tests on +every push and PR. + +## PRs and commits + +Commit and PR titles follow [Conventional +Commits](https://www.conventionalcommits.org/): `(): +`. + +Keep PRs small and focused on one change. If a PR changes a module's +contract, update `docs/architecture.md` to match. + +For anything bigger than a small fix, please open an issue first to discuss +the approach before doing the work. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4c301b2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Digital Democracy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From bfbddac9cfafec41268efe2a1d081ee0aa6e8158 Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Thu, 17 Sep 2026 10:47:48 +0100 Subject: [PATCH 2/2] Update copyright holder in LICENSE file --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 4c301b2..8edc097 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 Digital Democracy +Copyright (c) 2026 Awana Digital Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal