Skip to content

Commit

Permalink
chore(release): 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanksdesign committed Dec 16, 2021
1 parent 8a5f047 commit 983d9c6
Show file tree
Hide file tree
Showing 26 changed files with 127 additions and 106 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [3.1.0](https://github.com/amzn/style-dictionary/compare/v3.0.3...v3.1.0) (2021-12-16)


### Features

* **formats:** Add `outputReferences` support to `scss/map-deep` ([#720](https://github.com/amzn/style-dictionary/issues/720)) ([65453e0](https://github.com/amzn/style-dictionary/commit/65453e0d980273aeeb1a201a1996c4ad3a5719a5)), closes [#712](https://github.com/amzn/style-dictionary/issues/712)
* **formats:** add support for Microsoft's JSONC format ([#732](https://github.com/amzn/style-dictionary/issues/732)) ([cfa83cb](https://github.com/amzn/style-dictionary/commit/cfa83cb65b7ec7b3e5a9def7f0ceb6ac3b2898df)), closes [#698](https://github.com/amzn/style-dictionary/issues/698)
* **formats:** object handling for typescript/es6-declarations ([#718](https://github.com/amzn/style-dictionary/issues/718)) ([4e3905a](https://github.com/amzn/style-dictionary/commit/4e3905a7a3525f872615adaf0cae0b5553309bb6))
* **references:** ability to reference other tokens without 'value' ([#746](https://github.com/amzn/style-dictionary/issues/746)) ([c6f482e](https://github.com/amzn/style-dictionary/commit/c6f482e2845f8e13e579ffc858b0e53b9155a47e))
* **transforms:** add transformer for Color class from SwiftUI ([#733](https://github.com/amzn/style-dictionary/issues/733)) ([439e474](https://github.com/amzn/style-dictionary/commit/439e474aee9da8390f447f31d412e496c45b4605))


### Bug Fixes

* **cli:** fixing unknown commands message ([#747](https://github.com/amzn/style-dictionary/issues/747)) ([8a5f047](https://github.com/amzn/style-dictionary/commit/8a5f047af4a97a51894d4dfe4c917bf91686db8e))
* **examples:** Watch correct directory ([#739](https://github.com/amzn/style-dictionary/issues/739)) ([56574a4](https://github.com/amzn/style-dictionary/commit/56574a4247eafc79a843e80f433feaf025142ff8)), closes [#705](https://github.com/amzn/style-dictionary/issues/705)
* **types:** adding registerFileHeader type ([#722](https://github.com/amzn/style-dictionary/issues/722)) ([54332b3](https://github.com/amzn/style-dictionary/commit/54332b3e4ee77a0b0e8f84836413949f8e64ccd5)), closes [#665](https://github.com/amzn/style-dictionary/issues/665)
* **types:** fixing transform group types ([#729](https://github.com/amzn/style-dictionary/issues/729)) ([ad7f6ea](https://github.com/amzn/style-dictionary/commit/ad7f6ea555ec77defd264c9ade9628aefd108959))
* **types:** make FileHeaderArgs.commentStyle optional ([#743](https://github.com/amzn/style-dictionary/issues/743)) ([401d93b](https://github.com/amzn/style-dictionary/commit/401d93b72caf02cec34fba3c214edfdd5d52b362))

### [3.0.3](https://github.com/amzn/style-dictionary/compare/v3.0.2...v3.0.3) (2021-10-15)


Expand Down
28 changes: 15 additions & 13 deletions docs/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ which uses: prefix, indentation, separator, suffix, and commentStyle.
</td>
</tr><tr>
<td>options.formatting</td><td><code>Object</code></td><td><p>Custom formatting properties that define parts of a declaration line in code. The configurable strings are: prefix, indentation, separator, suffix, and commentStyle. Those are used to generate a line like this: <code>${indentation}${prefix}${prop.name}${separator} ${prop.value}${suffix}</code></p>
</td>
</tr><tr>
<td>options.themeable</td><td><code>Boolean</code></td><td><p>[false] - Whether tokens should default to being themeable.</p>
</td>
</tr> </tbody>
</table>
Expand Down Expand Up @@ -434,7 +437,7 @@ default file header.
StyleDictionary.registerFormat({
name: 'myCustomFormat',
formatter: function({ dictionary, file }) {
return fileHeader({file, 'short') +
return fileHeader({file, commentStyle: 'short'}) +
dictionary.allTokens.map(token => `${token.name} = ${token.value}`)
.join('\n');
}
Expand Down Expand Up @@ -468,6 +471,9 @@ This is used to create lists of variables like Sass variables or CSS custom prop
</td>
</tr><tr>
<td>options.formatting</td><td><code>Object</code></td><td><p>Custom formatting properties that define parts of a declaration line in code. This will get passed to <code>formatHelpers.createPropertyFormatter</code> and used for the <code>lineSeparator</code> between lines of code.</p>
</td>
</tr><tr>
<td>options.themeable</td><td><code>Boolean</code></td><td><p>[false] - Whether tokens should default to being themeable.</p>
</td>
</tr> </tbody>
</table>
Expand All @@ -488,7 +494,7 @@ StyleDictionary.registerFormat({
> formatHelpers.getTypeScriptType(value) ⇒ <code>String</code>
Given some value, returns a basic valid TypeScript type for that value.
Supports numbers, strings, booleans, and arrays of any of those types.
Supports numbers, strings, booleans, arrays and objects of any of those types.

**Returns**: <code>String</code> - A valid name for a TypeScript type.
```
Expand Down Expand Up @@ -767,7 +773,7 @@ $tokens: (

Creates a SCSS file with a deep map based on the style dictionary.

Note that `options.themeable` defaults to `true` by default, unlike the [scss/variables](scss/variables) format, for backwards compatibility.
Name the map by adding a 'mapName' attribute on the file object in your config.

<table>
<thead>
Expand All @@ -779,16 +785,10 @@ Note that `options.themeable` defaults to `true` by default, unlike the [scss/va
<tr>
<td>options</td><td><code>Object</code></td><td></td><td></td>
</tr><tr>
<td>[options.mapName]</td><td><code>String</code></td><td><code>tokens</code></td><td><p>Name the Sass map</p>
</td>
</tr><tr>
<td>[options.showFileHeader]</td><td><code>Boolean</code></td><td><code>true</code></td><td><p>Whether or not to include a comment that has the build date</p>
</td>
</tr><tr>
<td>[options.themeable]</td><td><code>Boolean</code></td><td><code>true</code></td><td><p>Whether or not to add the `!default` flag on Sass variables by default. This may be overridden by setting a `themeable` attribute in a <a href="/#/tokens?id=design-token-attributes">token's definition</a>.</p>
<td>[options.outputReferences]</td><td><code>Boolean</code></td><td><code>false</code></td><td><p>Whether or not to keep <a href="/#/formats?id=references-in-output-files">references</a> (a -&gt; b -&gt; c) in the output.</p>
</td>
</tr><tr>
<td>[options.outputReferences]</td><td><code>Boolean</code></td><td><code>false</code></td><td><p>Whether or not to keep <a href="/#/formats?id=references-in-output-files">references</a> (a -&gt; b -&gt; c) in the output.</p>
<td>[options.themeable]</td><td><code>Boolean</code></td><td><code>true</code></td><td><p>Whether or not tokens should default to being themeable, if not otherwise specified per token.</p>
</td>
</tr> </tbody>
</table>
Expand All @@ -815,6 +815,8 @@ $tokens: {

Creates a SCSS file with variable definitions based on the style dictionary.

Add `!default` to any variable by setting a `themeable: true` attribute in the token's definition.
<table>
<thead>
<tr>
Expand All @@ -828,10 +830,10 @@ Creates a SCSS file with variable definitions based on the style dictionary.
<td>[options.showFileHeader]</td><td><code>Boolean</code></td><td><code>true</code></td><td><p>Whether or not to include a comment that has the build date</p>
</td>
</tr><tr>
<td>[options.themeable]</td><td><code>Boolean</code></td><td><code>false</code></td><td><p>Whether or not to add the `!default` flag on Sass variables by default. This may be overridden by setting a `themeable` attribute in a <a href="/#/tokens?id=design-token-attributes">token's definition</a>.</p>
<td>[options.outputReferences]</td><td><code>Boolean</code></td><td><code>false</code></td><td><p>Whether or not to keep <a href="/#/formats?id=references-in-output-files">references</a> (a -&gt; b -&gt; c) in the output.</p>
</td>
</tr><tr>
<td>[options.outputReferences]</td><td><code>Boolean</code></td><td><code>false</code></td><td><p>Whether or not to keep <a href="/#/formats?id=references-in-output-files">references</a> (a -&gt; b -&gt; c) in the output.</p>
<td>[options.themeable]</td><td><code>Boolean</code></td><td><code>false</code></td><td><p>Whether or not tokens should default to being themeable, if not otherwise specified per token.</p>
</td>
</tr> </tbody>
</table>
Expand Down
32 changes: 15 additions & 17 deletions docs/transform_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You use transformGroups in your config file under platforms > [platform] > trans

[lib/common/transformGroups.js](https://github.com/amzn/style-dictionary/blob/main/lib/common/transformGroups.js)

### web
### web


Transforms:
Expand All @@ -38,7 +38,7 @@ Transforms:

* * *

### js
### js


Transforms:
Expand All @@ -51,7 +51,7 @@ Transforms:

* * *

### scss
### scss


Transforms:
Expand All @@ -66,7 +66,7 @@ Transforms:

* * *

### css
### css


Transforms:
Expand All @@ -81,7 +81,7 @@ Transforms:

* * *

### less
### less


Transforms:
Expand All @@ -96,7 +96,7 @@ Transforms:

* * *

### html
### html


Transforms:
Expand All @@ -108,7 +108,7 @@ Transforms:

* * *

### android
### android


Transforms:
Expand All @@ -122,7 +122,7 @@ Transforms:

* * *

### compose
### compose


Transforms:
Expand All @@ -137,7 +137,7 @@ Transforms:

* * *

### ios
### ios


Transforms:
Expand All @@ -153,15 +153,14 @@ Transforms:

* * *

### ios-swift
### ios-swift


Transforms:

[attribute/cti](transforms.md#attributecti)
[name/cti/camel](transforms.md#namecticamel)
[color/UIColorSwift](transforms.md#coloruicolorswift)
[`color/ColorSwiftUI`](transforms.md#colorcolorswiftui)
[content/swift/literal](transforms.md#contentswiftliteral)
[asset/swift/literal](transforms.md#assetswiftliteral)
[size/swift/remToCGFloat](transforms.md#sizeswiftremtocgfloat)
Expand All @@ -170,15 +169,14 @@ Transforms:

* * *

### ios-swift-separate
### ios-swift-separate


Transforms:

[attribute/cti](transforms.md#attributecti)
[name/ti/camel](transforms.md#nameticamel)
[color/UIColorSwift](transforms.md#coloruicolorswift)
[color/ColorSwiftUI](transforms.md#colorcolorswiftui)
[content/swift/literal](transforms.md#contentswiftliteral)
[asset/swift/literal](transforms.md#assetswiftliteral)
[size/swift/remToCGFloat](transforms.md#sizeswiftremtocgfloat)
Expand All @@ -189,7 +187,7 @@ This is to be used if you want to have separate files per category and you don't

* * *

### assets
### assets


Transforms:
Expand All @@ -199,7 +197,7 @@ Transforms:

* * *

### flutter
### flutter


Transforms:
Expand All @@ -215,7 +213,7 @@ Transforms:

* * *

### flutter-separate
### flutter-separate


Transforms:
Expand All @@ -233,7 +231,7 @@ This is to be used if you want to have separate files per category and you don't

* * *

### react-native
### react-native


Transforms:
Expand Down
Loading

0 comments on commit 983d9c6

Please sign in to comment.