wcb/create/template
Ayo Ayco 55405cac2c
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
chore: update typescript comment in create template
2026-07-23 11:00:21 +02:00
..
src chore: update typescript comment in create template 2026-07-23 11:00:21 +02:00
_gitignore chore(create): rename workspace 2026-07-22 20:40:21 +02:00
custom-elements-manifest.config.mjs chore(create): rename workspace 2026-07-22 20:40:21 +02:00
index.html chore(create): rename workspace 2026-07-22 20:40:21 +02:00
package.json chore(create): rename workspace 2026-07-22 20:40:21 +02:00
pnpm-workspace.yaml chore(create): rename workspace 2026-07-22 20:40:21 +02:00
README.md chore(create): rename workspace 2026-07-22 20:40:21 +02:00
vite-lib.config.ts chore(create): rename workspace 2026-07-22 20:40:21 +02:00

wcb-button

A publishable custom element built on web-component-base, scaffolded with npm create wcb@latest.

Commands

  • npm run dev — start the Vite dev server on the index.html demo page
  • npm run build — build the demo page
  • npm run build:lib — build the library: ESM + UMD bundles and .d.ts types in dist/, with web-component-base left external (it is a peerDependency)
  • npm run analyze — generate custom-elements.json from the component's static props

Publishing

npm publish (or npm pack) runs the prepack script, which rebuilds the library and regenerates custom-elements.json — both ship inside the package, and the customElements field in package.json is how Storybook, editors, and other tooling discover the manifest. In the repo itself the manifest stays gitignored; it is a build artifact.

See the CEM plugin guide for setting it up with Storybook and code editors.


Just keep building.