brd-react-projects
v0.0.7
Published
Boardriders React projects for SFCC content assets (PROJECT_MAP)
Readme
brd-react-projects
Thin registry (PROJECT_MAP) that bundles UX React projects for SFCC content assets / PWA Kit.
Add a project (2 steps)
1. In the UX project — export a CMS entry
Create src/project.tsx and export Project:
export function Project(props: Record<string, unknown>) {
// self-contained: locales, consent, UI…
return null
}2. In this package — register the tag
Edit src/projectMap.tsx only:
import { Project as mytag } from "../../../global/.../my_project/src/project.tsx"
export const PROJECT_MAP = {
cookiespopup,
mytag, // CMS tag <mytag>
} as constRebuild: pnpm run build then publish.
Usage (storefront)
import { COMPONENT_MAP } from "brd-react-components"
import { PROJECT_MAP } from "brd-react-projects"
const COMPONENTS = { ...COMPONENT_MAP, ...PROJECT_MAP }Development
pnpm install
pnpm run build
pnpm test