@zence_er/theme-host-kit
v0.2.2
Published
Standalone Theme CMS host runtime: manifest, CSS vars, /published rewrite, MF remotes, travel feature helpers. Consumed by CMS + host apps via npm install.
Maintainers
Readme
@zence_er/theme-host-kit
Standalone package for Theme CMS host runtime.
Source of truth: this folder (er-theme-host-kit).
Not inside er-theme-cms. Public npm package under your npm user scope (zence_er).
Note: Host apps still import as
@er/theme-host-kitvia Vite aliases. The npm package name is@zence_er/theme-host-kit(required — you do not own the@erorg on npm).
Install (npm)
npm i @zence_er/theme-host-kit"@zence_er/theme-host-kit": "^0.2.2"Vite resolve helper (published)
import { resolveThemeHostKit } from "@zence_er/theme-host-kit/resolve-for-vite";
const themeHostKit = resolveThemeHostKit(__dirname);
// alias @er/theme-host-kit → themeHostKit.rootBuild / minify (required before npm publish)
npm install
npm run build # esbuild → dist/*.js (minified, export names kept)prepublishOnly runs verify + build automatically on npm publish.
Published tarball ships dist/ + scripts/resolve-for-vite.mjs (+ README).
Publish
cd er-theme-host-kit
npm publish --access public
# or: npm publish --access public --otp=XXXXXXUsage (imports stay @er/... in hosts)
import {
useCmsManifest,
useCmsModuleGate,
useCmsModuleAvailability,
applyHostTheme,
fetchModuleRemoteEntry,
normalizeTravelFeatures,
} from "@er/theme-host-kit";
import { useCmsModuleTheme } from "@er/theme-host-kit/useCmsModuleTheme";Peer dependencies
react>= 18
Develop
npm run verify
npm run pack:dry