plugin-designs/README: the tree is dx-maps, and a bundle's tag is its folder name
Some checks are pending
Deploy to GitHub Pages / build (push) Waiting to run
Deploy to GitHub Pages / deploy (push) Blocked by required conditions

Four path lines said public/doxa-maps/ (the folder was renamed in 09014f8a), and the embed
example used a <doxa-map> tag, but a bundle registers the tag named after its folder
(template-bundle/index.js), so the example is <your-map>.
This commit is contained in:
Doxa Maps 2026-09-26 01:02:40 +00:00
parent f4833def5b
commit 6d7da1c0f7

View file

@ -47,7 +47,7 @@ plugin-designs/<your-map>/ ← one FOLDER = one BUNDLE, named after the fold
├── overview.vue ← one .vue = one PROFILE (flat in the folder — no profiles/ subfolder)
└── detail.vue ← another profile in the SAME bundle
builds to ─────────────► public/doxa-maps/<your-map>/<your-map>.js (one file)
builds to ─────────────► public/dx-maps/<your-map>/<your-map>.js (one file)
```
- **Folder name = bundle name.** Folders starting with `_` or `.` are skipped (handy for WIP).
@ -55,9 +55,9 @@ plugin-designs/<your-map>/ ← one FOLDER = one BUNDLE, named after the fold
- **Pick the profile at embed time** with the `profile` field — every profile shares one bundle:
```html
<script src="/doxa-maps/<your-map>/<your-map>.js"></script>
<doxa-map profile-config='{"profile":"overview","tk":"pk.eyJ..."}'></doxa-map>
<doxa-map profile-config='{"profile":"detail","tk":"pk.eyJ..."}'></doxa-map>
<script src="/dx-maps/<your-map>/<your-map>.js"></script>
<your-map profile-config='{"profile":"overview","tk":"pk.eyJ..."}'></your-map>
<your-map profile-config='{"profile":"detail","tk":"pk.eyJ..."}'></your-map>
```
## Add a map — three steps
@ -69,7 +69,7 @@ mkdir -p plugin-designs/<your-map>
# <name>.vue ← your screen, built from @map/* blocks (flat in the folder)
# 2. build
npm run build # → public/doxa-maps/<your-map>/<your-map>.js
npm run build # → public/dx-maps/<your-map>/<your-map>.js
# (just this one: BUNDLE=<your-map> npm run build:bundle)
# 3. embed the script tag + element (dev staging at `npm run dev` shows a paste-ready snippet)