plugin-designs/README: the tree is dx-maps, and a bundle's tag is its folder name
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:
parent
f4833def5b
commit
6d7da1c0f7
1 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue