CWUI In development Header

CropWatch UI Demo

Select a component from the sidebar to view demos, API behavior, and copy-paste examples.

Update Existing Install

If you already use @cropwatchdevelopment/cwui, clear local build artifacts first, then upgrade:

rm -rf node_modules .svelte-kit
pnpm install
pnpm up @cropwatchdevelopment/cwui --latest
		

Getting Started (Not Installed Yet)

Install the package in your SvelteKit project:

pnpm add @cropwatchdevelopment/cwui

Load the base styles and a theme once (typically in your root layout):

<script lang="ts">
	import '@cropwatchdevelopment/cwui/styles';
	import '@cropwatchdevelopment/cwui/styles/tokens';
	import '@cropwatchdevelopment/cwui/styles/theme-light';
</script>

<slot />

Verify

Start your app and open this demo route to validate everything is wired correctly:

pnpm dev

Maintainer Workflow

Publish A New Package

CWUI publishes through GitHub Packages at npm.pkg.github.com. After bumping the version, release by pushing a matching Git tag.

  1. Confirm the release version

    Bump package.json, then make sure the release commit on main is the exact code you want to publish.

  2. Push the release commit

    If your version bump is only local, push main first so the tag points at a commit GitHub Actions can build.

    git push origin main
  3. Create the matching tag

    The publish workflow only runs for tags shaped like v<version>. The tag must match package.json exactly.

    git tag v<your-version>
  4. Push the tag to publish

    Pushing the tag triggers the GitHub Packages release workflow.

    git push origin v<your-version>
  5. Watch the workflow finish

    Open the publish workflow in GitHub Actions and wait for the package job to complete before announcing the release.

The workflow checks whether the tagged version already exists. If that version is already in the registry, the publish step is skipped instead of failing.