Retrieving and working with the tokens
Get a SDTFClient
SDTFClient // Fetch a Repository
const SPECIFY_REPOSITORY_NAME = "MY-REPOSITORY-NAME";
const sdtfClient = await specifyClient.getSDTFClientByRepositoryName(
SPECIFY_REPOSITORY_NAME,
);
console.log(`Fetched repository: ${sdtfClient.repository.name}`);Get the SDTF JSON token tree
const jsonTokenTree = sdtfClient.getJSONTokenTree();
console.log(jsonTokenTree) // the object literal representation of the Specify Design Token dataRetrieving the tokens
Retrieving a single token
Retrieving all the tokens
Tokens
Groups
Collections
Retrieving specific tokens
The token architecture
A basic token
An alias at the value level
An alias at the mode level
An alias at the top level
How to differentiate the tokens?
How to get the token value ?
Ignoring aliasing
Handling the aliases
Overview of the API
Resolving an alias
Handling only the value case
Last updated
Was this helpful?