-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: move file options inside the file.options obj * fix: formats using formatHelpers respect formatting
- Loading branch information
1 parent
76d5ab4
commit 2f80da2
Showing
35 changed files
with
880 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
'style-dictionary': patch | ||
--- | ||
|
||
All formats using `createPropertyFormatter` or `formattedVariables` helpers now respect the `file.options.formatting` option passed by users to customize formatting. | ||
|
||
Example: | ||
|
||
```js | ||
{ | ||
platforms: { | ||
css: { | ||
transformGroup: 'css', | ||
buildPath, | ||
files: [ | ||
{ | ||
destination: 'variables.css', | ||
format: 'css/variables', | ||
options: { | ||
formatting: { indentation: ' ' }, | ||
}, | ||
}, | ||
] | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
'style-dictionary': major | ||
--- | ||
|
||
BREAKING: `className`, `packageName`, `mapName` and `type` options for a bunch of built-in formats have been moved from `file` to go inside the `file.options` object, for API consistency reasons. | ||
|
||
Before: | ||
|
||
```json | ||
{ | ||
"files": [{ | ||
"destination": "tokenmap.scss", | ||
"format": "scss/map-deep", | ||
"mapName": "tokens" | ||
}] | ||
} | ||
``` | ||
|
||
After: | ||
|
||
```json | ||
{ | ||
"files": [{ | ||
"destination": "tokenmap.scss", | ||
"format": "scss/map-deep", | ||
"options": { | ||
"mapName": "tokens" | ||
} | ||
}] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.