Package Exports
- @cobalt-ui/plugin-ts
- @cobalt-ui/plugin-ts/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cobalt-ui/plugin-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@cobalt-ui/plugin-ts
Generate TypeScript output from design tokens.
npm i -D @cobalt-ui/plugin-ts
// tokens.config.mjs
import ts from '@cobalt-ui/plugin-ts';
export default {
plugins: [
ts({
/** set the filename inside outDir */
filename: './index.ts',
/** modify values */
transformValue(value, token) {
return value;
},
}),
],
};
Tools
When you import your generated TypeScript, you’ll find more than just your tokens—you’ll find some handy utilities in there as well.
Color
TODO