@vulcantech/cms
v0.1.0
Published
Umbrella entry point for the VulcanTech CMS integration packages — one dependency, radix-ui-style imports for blog, collections, forms, banners, analytics, and seo-files.
Readme
@vulcantech/cms
Umbrella entry point for the VulcanTech CMS integration packages — one dependency, radix-ui-style imports. Re-exports (nothing lives here except re-export files):
| Subpath | Wraps | Side |
| --- | --- | --- |
| @vulcantech/cms/blog | @vulcantech/blog | server |
| @vulcantech/cms/collections | @vulcantech/collections | server |
| @vulcantech/cms/seo-files | @vulcantech/seo-files | server |
| @vulcantech/cms/forms | @vulcantech/forms | client |
| @vulcantech/cms/banners | @vulcantech/banners | client |
| @vulcantech/cms/analytics | @vulcantech/analytics | client |
| @vulcantech/cms/analytics/tags | @vulcantech/analytics/tags | server |
| @vulcantech/cms/analytics/route | @vulcantech/analytics/route | server |
Not included (app-internal, not consumer integrations): blog-editor-shared, seo-board-shared, ui, server.
Import styles
Namespaced root — server components, layouts, route handlers:
import { Blog, Collections } from "@vulcantech/cms";
const posts = await Blog.fetchBlogPosts();
const html = Blog.sanitizeHtml(post.content); // Collections.sanitizeHtml stays distinctSubpaths — direct named imports; required inside "use client" files:
import { DynamicForm } from "@vulcantech/cms/forms";
import { CMSBanners } from "@vulcantech/cms/banners";Rule of thumb: the root barrel imports every package, including the server fetch layers (next/server, next/headers). From client components always use the subpath, so server modules stay out of the client graph. Route files re-export as usual:
export { POST, OPTIONS } from "@vulcantech/cms/analytics/route";External usage (npm)
Published to npm under the vulcantech org (leaf packages first, umbrella last — scripts/publish-cms-packages.sh at the repo root does both in order):
npm install @vulcantech/cmsExternal consumers get built dist/ (ESM + CJS + d.ts) for the umbrella and every leaf package; no transpilation or aliasing needed.
Adopting in a monorepo consumer app
The umbrella re-exports by package name, so every existing webpack/turbopack alias and tsconfig paths mapping for the underlying packages keeps applying — nothing is resolved twice.
- package.json — add
"@vulcantech/cms": "*". The six underlying packages come in transitively; keep direct deps only if you still import them directly. - next.config — add
"@vulcantech/cms"totranspilePackages, and alias its subpaths topackages/cms/src/*the same way the app already aliases the leaf packages —dist/is gitignored, so inside Docker builds onlysrc/exists (the banners-extraction gotcha). - tsconfig
paths— keep/add the source mappings for the underlying packages you use, plus"@vulcantech/cms": ["../../packages/cms/src/index.ts"]and"@vulcantech/cms/*": ["../../packages/cms/src/*"]; seesmoke/tsconfig.jsonhere for the leaf-package set. - Dockerfile —
COPY packages/cmsin the deps stage, next to the otherpackages/*COPY lines (same frozen-lockfile gotcha as the banners extraction).
Verifying
yarn workspace @vulcantech/cms typecheckyarn workspace @vulcantech/cms smoke typechecks a consumer-style import of every subpath through the real exports map.
