Release Notes - v0.4.0¶
Release Date: 2026-06-29
Highlights¶
- NPM Package Generation - Generate publishable NPM packages with framework-specific outputs
- Single-file Loader - Load design systems from
design-system.jsonfiles - Seven Target Formats - CSS, Tailwind, ShadCN, MkDocs Material, SCSS, JSON, W3C
What's New¶
NPM Package Generation¶
Generate complete, publishable NPM packages from your design system specification with framework-specific presets and configurations.
CLI Usage:
# Generate package with all targets
dss generate --package ./dist --targets all
# Generate with specific targets
dss generate --package ./dist --targets css,tailwind,shadcn
# Custom scope and name
dss generate --package ./dist --scope @myorg --name tokens
Available Targets:
| Target | Output | Use Case |
|---|---|---|
css |
CSS custom properties | Vanilla CSS/HTML projects |
tailwind |
Tailwind v4 preset and theme | Tailwind CSS v4+ projects |
shadcn |
ShadCN/UI theme variables | ShadCN/UI component library |
mkdocs-material |
MkDocs Material theme | Documentation sites |
scss |
SCSS variables | Sass/SCSS projects |
json |
Raw JSON tokens | Build tool pipelines |
w3c |
W3C Design Tokens format | Standards-compliant token exchange |
Generated Package Structure:
dist/
├── package.json # NPM package manifest with exports
├── index.js # CommonJS entry point
├── index.mjs # ES module entry point
├── index.d.ts # TypeScript declarations
├── README.md # Usage documentation
├── css/
│ └── tokens.css # CSS custom properties
├── tailwind/
│ ├── preset.js # Tailwind preset
│ └── theme.json # Tailwind v4 theme
├── shadcn/
│ └── theme.css # ShadCN theme variables
└── scss/
└── tokens.scss # SCSS variables
Example: Using Generated Tailwind Package
Install:
Configure tailwind.config.js:
import tokens from '@myorg/design-tokens/tailwind';
export default {
presets: [tokens],
content: ['./src/**/*.{js,jsx,ts,tsx}'],
};
Example: Using Generated ShadCN Package
Import in your CSS:
Example: Using with MkDocs Material
Configure mkdocs.yml:
Single-file Loader Support¶
The loader now supports loading design systems from a single design-system.json file in addition to directory-based structures.
Before (directory structure):
my-design-system/
├── meta.json
├── foundations/
│ ├── colors.json
│ └── typography.json
└── components/
└── button.json
Now (single file):
{
"meta": {
"name": "My Design System",
"version": "1.0.0"
},
"foundations": {
"colors": [...],
"typography": {...}
},
"components": [...]
}
CLI:
Go SDK:
Added¶
GeneratePackage()method for NPM package generationPackageGeneratorOptionsstruct with target configurationPackageTargetconstants for all supported formats--package,--scope,--name,--targets,--dry-runCLI flags- Single-file loader support for
design-system.json - Comprehensive package generation tests
Fixed¶
- Directory loader now recognizes
design-system.jsonin addition to folder structures
Documentation¶
- NPM package generation roadmap and examples
- Updated CLI reference with
--packageflag - Updated task list tracking implementation progress
Build¶
- Updated Go module dependencies
Installation¶
# CLI tool
go install github.com/plexusone/design-system-spec/cmd/dss@v0.4.0
# Go SDK
go get github.com/plexusone/design-system-spec@v0.4.0
Quick Start¶
# Load design system
cd my-design-system
# Generate NPM package with all targets
dss generate --package ./dist --targets all
# Publish to NPM
cd dist
npm publish
SDK Usage¶
import dss "github.com/plexusone/design-system-spec/sdk/go"
ds, _ := dss.LoadDesignSystem("./my-design-system/")
opts := dss.PackageGeneratorOptions{
OutputDir: "./dist",
Scope: "@myorg",
PackageName: "design-tokens",
Targets: []dss.PackageTarget{
dss.TargetCSS,
dss.TargetTailwind,
dss.TargetShadCN,
},
}
err := ds.GeneratePackage(opts)
What's Next¶
dss initscaffolding for new design systemsdss lintfor spec completeness checking- Advanced validation (color contrast, composition rules)
- Figma tokens import/export