style-dictionary 4.3.3 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/advanced/assets-base64-embed/package.json +1 -1
- package/examples/advanced/create-react-app/package.json +1 -1
- package/examples/advanced/create-react-native-app/package.json +1 -1
- package/examples/advanced/custom-parser/package.json +1 -1
- package/examples/advanced/custom-transforms/package.json +1 -1
- package/examples/advanced/font-face-rules/package.json +1 -1
- package/examples/advanced/format-helpers/package.json +1 -1
- package/examples/advanced/matching-build-files/package.json +1 -1
- package/examples/advanced/multi-brand-multi-platform/package.json +1 -1
- package/examples/advanced/node-modules-as-config-and-properties/components/index.js +1 -1
- package/examples/advanced/node-modules-as-config-and-properties/config.js +3 -3
- package/examples/advanced/node-modules-as-config-and-properties/package-lock.json +2201 -0
- package/examples/advanced/node-modules-as-config-and-properties/package.json +1 -1
- package/examples/advanced/node-modules-as-config-and-properties/tokens/color/index.js +5 -5
- package/examples/advanced/node-modules-as-config-and-properties/tokens/index.js +2 -2
- package/examples/advanced/node-modules-as-config-and-properties/tokens/size/index.js +7 -3
- package/examples/advanced/npm-module/package.json +1 -1
- package/examples/advanced/referencing_aliasing/package.json +1 -1
- package/examples/advanced/s3/package.json +1 -1
- package/examples/advanced/tailwind-preset/package.json +1 -1
- package/examples/advanced/tokens-deprecation/package.json +1 -1
- package/examples/advanced/transitive-transforms/package.json +1 -1
- package/examples/advanced/variables-in-outputs/package.json +1 -1
- package/examples/advanced/yaml-tokens/package.json +1 -1
- package/lib/StyleDictionary.js +1 -1
- package/lib/common/formatHelpers/createPropertyFormatter.js +1 -1
- package/lib/common/formats.js +70 -22
- package/lib/utils/preprocess.js +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import StyleDictionary from 'style-dictionary';
|
|
2
2
|
import { formats, transforms, transformGroups, transformTypes } from 'style-dictionary/enums';
|
|
3
|
-
import tokens from './tokens.js';
|
|
3
|
+
import tokens from './tokens/index.js';
|
|
4
4
|
// Rather than have Style Dictionary handle the merging of token files,
|
|
5
5
|
// you could use node module export/require to do it yourself. This will
|
|
6
6
|
// allow you to not have to copy object namespaces like you normally would.
|
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
|
|
88
88
|
scss: {
|
|
89
89
|
// This works, we can create new transform arrays on the fly and edit built-ins
|
|
90
|
-
transforms: StyleDictionary.hooks.scss
|
|
90
|
+
transforms: StyleDictionary.hooks.scss?.concat(colorRgb),
|
|
91
91
|
buildPath: buildPath,
|
|
92
92
|
files: [
|
|
93
93
|
{
|
|
@@ -98,7 +98,7 @@ export default {
|
|
|
98
98
|
},
|
|
99
99
|
|
|
100
100
|
js: {
|
|
101
|
-
transforms: StyleDictionary.hooks.js
|
|
101
|
+
transforms: StyleDictionary.hooks.js?.concat('myRegisteredTransform'),
|
|
102
102
|
buildPath: buildPath,
|
|
103
103
|
// If you want to get super fancy, you can use node modules
|
|
104
104
|
// to create a tokens object first, and then you can
|