Skip to content

Commit 7a423aa

Browse files
committed
feat(tokens): add open type conversion to style-dictionary
1 parent af3b9ad commit 7a423aa

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

components/tokens/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const StyleDictionary = require('style-dictionary');
1515
const CSSSetsFormatter = require('style-dictionary-sets').CSSSetsFormatter;
1616
const NameKebabTransfom = require('style-dictionary-sets').NameKebabTransfom;
1717
const AttributeSetsTransform = require('style-dictionary-sets').AttributeSetsTransform;
18+
const CSSOpenTypeTransform = require('style-dictionary-sets').CSSOpenTypeTransform;
1819

1920
/**
2021
* @note This references the package.json because we want the root folder and
@@ -26,6 +27,7 @@ const tokensDir = path.dirname(tokensPath);
2627

2728
StyleDictionary.registerTransform(NameKebabTransfom);
2829
StyleDictionary.registerTransform(AttributeSetsTransform);
30+
StyleDictionary.registerTransform(CSSOpenTypeTransform);
2931
StyleDictionary.registerFormat(CSSSetsFormatter);
3032

3133
const systemNames = ['express', 'spectrum', 'wireframe'];
@@ -139,7 +141,7 @@ module.exports = {
139141
platforms: {
140142
CSS: {
141143
buildPath: 'dist/css/',
142-
transforms: [AttributeSetsTransform.name, NameKebabTransfom.name],
144+
transforms: [AttributeSetsTransform.name, NameKebabTransfom.name, CSSOpenTypeTransform.name],
143145
prefix: 'spectrum',
144146
files: [
145147
{

components/tokens/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"gulp-concat": "^2.6.1",
2626
"rimraf": "^4.1.1",
2727
"style-dictionary": "^3.7.0",
28-
"style-dictionary-sets": "^2.0.2"
28+
"style-dictionary-sets": "^2.1.1"
2929
},
3030
"publishConfig": {
3131
"access": "public"

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16096,10 +16096,10 @@ strong-log-transformer@^2.1.0:
1609616096
minimist "^1.2.0"
1609716097
through "^2.3.4"
1609816098

16099-
style-dictionary-sets@^2.0.2:
16100-
version "2.0.5"
16101-
resolved "https://registry.yarnpkg.com/style-dictionary-sets/-/style-dictionary-sets-2.0.5.tgz#11d7cc85f603d0bbe76e46679ef9598c825916be"
16102-
integrity sha512-BeL+3GbtLRvkn21vjQN+si9RjVHbj+SJ208P9jexqM1ga+qzaZ7ofc6rgmG8zHTRdSjUXc+QbVLmDoMY68Pd7g==
16099+
style-dictionary-sets@^2.1.1:
16100+
version "2.1.1"
16101+
resolved "https://registry.yarnpkg.com/style-dictionary-sets/-/style-dictionary-sets-2.1.1.tgz#98ec8e2dc8c74b93d9d64963dc271f0543f5997f"
16102+
integrity sha512-pvm1Y6jdXi2IlsWgglnNK7YCi63jCy6VkaANuXQOC0XhxXDsdzo52PzJzEeAdfDZoiZ5DosGAWNpnZ0Yp4gqbQ==
1610316103
dependencies:
1610416104
deepmerge "^4.2.2"
1610516105

0 commit comments

Comments
 (0)