Build Scripts Overview
Overview of the build/tokens scripts and their roles in the Chassis Tokens system
On this page
Build Scripts Overview
The build/tokens directory contains the core scripts that power the Chassis Tokens transformation pipeline. These scripts orchestrate the process of converting design tokens into platform-ready assets for web, iOS, Android, and more. This documentation provides a high-level overview of each script and links to detailed documentation for each file.
Script Index
Each script is documented in detail in its own file. See the links above for specifics on usage, API, and examples.
How the Build System Works
- Entry Point: The build process starts with
build.js, which parses CLI arguments, generates build tasks, and invokes Style Dictionary for each task. - Configuration:
config.jsgenerates Style Dictionary configuration objects for each brand/app/platform/theme/screen combination. - Extensions: Custom filters, transforms, formats, and preprocessors are registered from their respective files.
- Execution: Each build task runs Style Dictionary with the generated configuration, producing output files for the target platform.
- Utilities: Helper functions in
utils.jssupport type mapping, font weight normalization, and more.
Continue to the next pages for detailed documentation of each script.