wcb/create-wcb/template
2026-07-21 21:27:18 +02:00
..
src feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
_gitignore feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
custom-elements-manifest.config.mjs feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
index.html feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
package.json feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
pnpm-workspace.yaml feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
README.md feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +02:00
vite-lib.config.ts feat: add create-wcb scaffolder (npm create wcb@latest) 2026-07-21 21:27:18 +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.