@guideveloper/design-assets
v0.1.13
Published
Design Asset Factory library of generated components and metadata.
Downloads
148
Readme
Design Asset Library
Source of truth for icons, illustrations, and animations. Generates React components, metadata exports, and publishes as @guideveloper/design-assets.
Structure
assets/raw assets + metadataassets/**/versions/<name>/vN.*immutable per-asset version history snapshotsscripts/generateAssets.tsscans assets and builds components + metadatasrc/componentsgenerated React componentssrc/metadatagenerated metadata arrays +assetVersionsmanifest +packageVersion
Commands
npm run generate-assets– generate components/metadata fromassetsnpm run build– bundle library via tsup (ESM + CJS)
Workflow
- Add/update files under
assets/icons|illustrations|animations(with matching.jsonmetadata files). - Run
npm installthennpm run generate-assets. - When you want a release, manually trigger the workflow (
.github/workflows/codegen-and-publish.yml) which runs codegen, bumps the version, builds the package, publishes to npm, and pushes the tagged release back tomaster.
Asset metadata format
- Naming: Use kebab-case file names (e.g.
pleased-to-meet-you). Long multi-word names without separators will fail generation. - Icon:
assets/icons/name.svg+assets/icons/name.json{ name, tags?, description? } - Illustration:
assets/illustrations/name.svg|png+assets/illustrations/name.json{ name, category?, tags?, description? } - Animation:
assets/animations/name.json(Lottie) +assets/animations/name.meta.json{ name, frameRate?, loop?, tags?, description? }
Version Metadata Exports
packageVersion: library package version baked into generated metadata.assetVersions: per-asset/per-version manifest containing:type,name,version,isLatestassetPath,metaPath,extensionpackageVersion
This is used by Design Asset Factory to render version dropdowns and download links for raw files/JSON.
Publishing
Set secrets:
NPM_TOKENfor npm publish
Package name: @guideveloper/design-assets
Manual release button
- GitHub Actions has a built-in “Run workflow” button for
Manual Codegen and Publish(workflow dispatch only; no auto-runs onmaster). - A lightweight front-end trigger lives at
scripts/run-manual-build.htmlwith a “Run workflow” button. Open the file in a browser, provide a GitHub token withworkflowscope (andrepo/public_repoas needed), choose the bump type, and dispatch the workflow onmaster.
