"transforms must be an array of registered value transforms"
ipoly opened this issue · 6 comments
sd-transforms/src/registerTransforms.ts
Line 212 in 376cbe6
The 'name/camel'
here will cause an error to be thrown.
Which version of sd-transforms vs style-dictionary are you using?
I have the same issue. Using:
@tokens-studio/sd-transforms: 0.15.2
style-dictionary: 3.9.2
Both are latest
at the time of writing.
If @tokens-studio/sd-transforms
is depending on a specific version(-range) of style-dictionary
, you might want to add that to peerDependencies
I fixed it for now using the following change:
diff --git a/dist/src/registerTransforms.js b/dist/src/registerTransforms.js
index 4ead120b89e8db6a98ccb1ea7513f6609ad37660..ab7e170c84f0a6161c10730909d0f70ddf261a3c 100644
--- a/dist/src/registerTransforms.js
+++ b/dist/src/registerTransforms.js
@@ -182,7 +182,7 @@ async function registerTransforms(sd, transformOpts) {
name: 'tokens-studio',
// add a default name transform, since this is almost always needed
// it's easy to override by users, adding their own "transforms"
- transforms: [...transforms, 'name/camel'],
+ transforms: [...transforms, 'name/cti/camel'],
});
}
I added a compatibility table in the README now and upgraded this package to 0.16.0 to be compatible with the latest Style Dictionary prerelease (27).
I used to avoid peerDependencies but I read that they're installed by default now in most package managers, so I'll give this a shot.
#278