
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Design token translator
Adopting the latest Design Token specification, it consumes token source files and exports them into usable files for different platforms.
npm install toko
There are currently 4 built-in strategies that are ready to use namely,
In which you can import from,
import { css } from 'toko/formats';
{
inputs: string[];
prefix?: string;
outDir?: string;
outputs: [
css({
prefix?: string,
resolve?: boolean,
filename?: string,
selector?: string
})
]
},
As JavaScript library, there are 2 approaches to use.
First, valid format JavaScript objects can be passed directly into translate(...)
import { TokenParser, TokenTranslator } from 'toko';
import { css } from 'toko/formats';
const config = {
...,
outputs: [css()]
}
const translator = new TokenTranslator(config);
const tokens = translator.translate(tokenJSON1, tokenJSON2, tokenJSON3);
Second approach, JavaScript objects can be pass to TokenParser
first and uses TokenCollection
. - an intermediate data structure that contains richer information, to pass to TokenTranslator
.
import { TokenParser, TokenTranslator, TokenCollection } from 'toko';
import { css } from 'toko/formats';
const parser = new TokenParser();
const collection: TokenCollection = parser.parse(tokenJSON1, tokenJSON2, tokenJSON3);
const config = {
...,
outputs: [css()]
}
const translator = new TokenTranslator(config);
const tokens = translator.translate(collection);
Or as cli
,
toko -c examples/cli.config.js
toko examples/base.tokens.json -f css scss -o tokens.css tokens.scss -d dist
To start demo page,
npm start
FAQs
Design token translator
The npm package toko receives a total of 2 weekly downloads. As such, toko popularity was classified as not popular.
We found that toko demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.