Theemo / @theemo/style-dictionary / isReferenceToken
Function: isReferenceToken()
ts
function isReferenceToken(token): boolean;
Defined in: filters/reference.ts:35
Check whether a token references another token.
Parameters
Parameter | Type | Description |
---|---|---|
token | TransformedToken | the token in question |
Returns
boolean
true
when the token references another one, otherwise false
Example
Usage:
js
import StyleDictionary from 'style-dictionary';
import { isReferenceToken } from '@theemo/style-dictionary';
export default {
source: ['tokens/**/*.json'],
platforms: {
css: {
files: [
{
format: 'css/variables',
destination: 'references.css',
filter: isReferenceToken
}
]
}
}
};