Skip to main content Skip to docs navigation

Build Scripts Overview

Overview of the build/tokens scripts and their roles in the Chassis Tokens system

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

  1. Entry Point: The build process starts with build.js, which parses CLI arguments, generates build tasks, and invokes Style Dictionary for each task.
  2. Configuration: config.js generates Style Dictionary configuration objects for each brand/app/platform/theme/screen combination.
  3. Extensions: Custom filters, transforms, formats, and preprocessors are registered from their respective files.
  4. Execution: Each build task runs Style Dictionary with the generated configuration, producing output files for the target platform.
  5. Utilities: Helper functions in utils.js support type mapping, font weight normalization, and more.

Continue to the next pages for detailed documentation of each script.