web-tooling-component-library
Installation
SKILL.md
Component Library Packaging
Quick Guide: This is the package boundary for UI code — what changes when styled, client-interactive React components stop being app files and become something another project installs. Five contracts have to be stated rather than assumed: how styles reach the consumer, what cascade layer they land in, whether
"use client"survives the build, what you demand of the consumer's React, and how many entries you expose. Each of them passes in the repo that builds it and fails in someone else's.
Detailed Resources:
- examples/core.md — complete manifests, the layered stylesheet, a directive-preserving build with its verification script, peer ranges, and the server/client entry split
- reference.md — directive preservation by build tool, source-consumed vs built comparison,
sideEffectsglob semantics
Which path applies
- Published to a registry, or consumed by a build you do not control — all five contracts apply, and the verification steps are the only thing standing between a green local build and a consumer's broken one.
- Consumed as source inside one repository, where every consumer shares this build and TS config — the style, layer, peer and entry contracts still apply; the directive and
sideEffectscontracts are about build output and have nothing to act on yet. Drifting from here to publication is what ships a manifest whoseexportsnames files the package does not contain.
<critical_requirements>