Setup
Requirements
| Requirement | Without it |
|---|---|
@livepreso/webpack-deck | Nothing is discovered. |
Project file version: 4 | Fields are discovered, but no interface is built, so nothing outside the deck can reach them. |
@livepreso/webpack-deck
npm install @livepreso/webpack-deck
Everything on these pages is imported from the package root:
import { defineEditableSource, defineActions, prop } from "@livepreso/webpack-deck";
Project file version 4
project.yaml
version: 4
Raising the version changes how the deck is bundled. Check
Project File Reference - Versions before raising it. :::
Minimum versions
Not published yet. :::
| Package | Minimum version |
|---|---|
@livepreso/webpack-deck | TBC |
@livepreso/content-react | TBC |
React decks
A React deck binds actions with useActions().
npm install @livepreso/content-react
Content from another package
The build reads the deck's own source and every @livepreso/* package. Name any other package that renders slide
content:
.deckrc.json
{
"contentPackages": ["@acme/slide-parts"]
}
Upgrading an existing deck
Two groups of warnings are off by default. Turn them on while moving a deck across.
.deckrc.json
{
"warnings": { "undiscoveredEditables": true, "showSilenced": true }
}
| Flag | Shows |
|---|---|
undiscoveredEditables | Every key the build could not read from source, and every key project.yaml lists that the build never found. |
showSilenced | Every warning a livepreso-ignore-next-line comment silenced. |
A key built from
{targetKey}-{id}, with no {instance}, is sharedby every copy of a template - two placements of the same template would show the same value. Add {instance} to keep
one value per copy:
everyone: { key: "{targetKey}-{id}" } before: one value for every copy
everyone: { key: "{targetKey}-{id}-{instance}" } after: one value per copy
A skill for upgrading a deck goes here. :::