to-swift
This parser helps you generate design tokens as Swift classes.
Interface
interface parser {
name: 'to-swift';
output: {
type: 'file';
filePath: string;
};
options?: {
tokenNameTemplate?: string;
scopeName?: string;
}
}Options
Parameter
Required
Type
Default
Description
tokenNameTemplate
false
string
{{path}}{{token}}{{mode}}
The template the parser follows to name your tokens.
You can use the path of your tokens, their token name, and their respective mode.
scopeName
false
string
DesignTokens
The name of the parent class which contains all classes for all your token types.
Basic usage
Last updated
Was this helpful?