@salesforce-ux/design-system-data
v0.0.0-dev.1752534604
Published
This package contains scripts to generate data and data assets for aspects of the Salesforce Lightning Design System (SLDS).
Maintainers
Readme
Design System Data
This package contains scripts to generate data and data assets for aspects of the Salesforce Lightning Design System (SLDS).
Installation
npm install @salesforce-ux/design-system-dataUsage
This package provides several npm scripts to generate design system data. All scripts support the --output argument to specify a custom output directory.
Icons
Generate icon data to console:
npm run generate:iconsGenerate icon data to file:
npm run generate:icons:fileGenerate icon data to a specific output directory:
npm run generate:icons:file -- --output ./distZip icons for distribution:
npm run generate:icons:zipStyling Hooks
The styling hooks generator creates comprehensive styling hooks by combining the original styling hooks approach with metadata supplementation. It preserves all existing properties (including comment) while supplementing them with the latest metadata values.
Available Scripts
Generate Lightning theme styling hooks to console:
npm run generate:styling-hooksGenerate both Lightning and Cosmos themes to files:
npm run generate:styling-hooks:fileGenerate Lightning theme to file:
npm run generate:styling-hooks:lightningGenerate Cosmos theme to file:
npm run generate:styling-hooks:cosmosGenerate to a specific output directory:
npm run generate:styling-hooks:file -- --output ./distOutput Files
When generating to files, the script creates:
styling-hooks-lightning.jsonfor Lightning themestyling-hooks-cosmos.jsonfor Cosmos theme
Design Tokens
Generate token data to console:
npm run generate:tokensGenerate token data to file:
npm run generate:tokens:fileGenerate token data to a specific output directory:
npm run generate:tokens:file -- --output ./distOutput Options
All generation scripts support the --output argument to specify a custom output directory:
--output <path>: Specify the output directory (defaults to current working directory)- The output directory will be created automatically if it doesn't exist
- Examples:
--output ./dist- Output to adistfolder in the current directory--output /absolute/path/to/output- Output to an absolute path
Data
The generated data can be imported and consumed in your design system components and applications.
Licenses
- Source code is licensed under BSD 3-Clause
- All icons and images are licensed under Creative Commons Attribution-NoDerivatives 4.0
