platform-brand
v0.1.4
Published
Brand packs read by every platform repo: identity, hosts per stage, contacts, social handles, product names, colours and art.
Readme
platform-brand
Brand packs read by every platform repo: identity, hosts per stage, contacts, social handles, product names, colours and art.
Generated from brand/packs.json in trastienda/marketing; do not edit a published copy. The source of every value
and the schema are brand/*.json and scripts/brand-contract.mjs there.
Packs: ficticia (a fake brand for rebrand proofs), trastienda. Default: trastienda.
import { brand, getPack, hosts, origin, literals, socialUrl, art } from 'platform-brand';
brand.name; // BRAND=<slug> selects the pack in Node; a bundler calls getPack(slug)
hosts('dev').api; // a hostname, or null where the stage has none
origin('app', 'prod'); // https://…
literals(); // { current, legacy } for a literal lint
art('markCurrentColor').svg; // inline markup; files at platform-brand/packs/<slug>/art/<role>.svgFor servers that only need identity, hosts, contacts, colours and the other brand data:
import { brand, getPack, hosts, origin, literals, socialUrl } from 'platform-brand/data';
// CommonJS: const { brand, hosts } = require('platform-brand/data');The /data entry exports the same helpers, packs, DEFAULT_PACK and STAGES, but
omits art, logos and the art() helper. It is a standalone module with no import
of the main entry or SVG files. Both entries use the same publishable packs and BRAND
selection, including the fixture pack; choosing /data does not exclude fixtures.
ESM and CommonJS each have matching TypeScript declarations. The main entry retains its artwork API.
Entry sizes
Exact generated UTF-8 bytes, before consumer bundling; gzip uses level 9. These are module sizes, not whole-package download sizes. The tarball still includes artwork for main-entry consumers.
| Module | Bytes | Gzip bytes |
|---|---:|---:|
| index.mjs | 36509 | 6680 |
| index.cjs | 36531 | 6698 |
| data/index.mjs | 8718 | 2515 |
| data/index.cjs | 8740 | 2531 |
