Skip to content

Commit

Permalink
chore(release): 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanksdesign committed May 5, 2020
1 parent 19c9797 commit a5b7636
Show file tree
Hide file tree
Showing 20 changed files with 173 additions and 17 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
@@ -1,7 +1,15 @@
# Change Log
# Changelog

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.

## [2.10.0](https://github.com/amzn/style-dictionary/compare/v2.9.0...v2.10.0) (2020-05-05)


### Features

* adding color/hsl and color/hsl-4 transforms ([#383](https://github.com/amzn/style-dictionary/issues/383)) ([b777cfb](https://github.com/amzn/style-dictionary/commit/b777cfb11e5edc32e61df2dd33909c37a7efe2e5))
* flutter support ([#320](https://github.com/amzn/style-dictionary/issues/320)) ([8a5f645](https://github.com/amzn/style-dictionary/commit/8a5f645cc9e73fea9bbb8b6b38c5baa1d23149c8)), closes [#255](https://github.com/amzn/style-dictionary/issues/255) [#288](https://github.com/amzn/style-dictionary/issues/288)

<a name="2.9.0"></a>
# [2.9.0](https://github.com/amzn/style-dictionary/compare/v2.8.3...v2.9.0) (2020-04-21)

Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Expand Up @@ -219,7 +219,7 @@ Add a custom format to the style dictionary
| --- | --- | --- |
| format | <code>Object</code> | |
| format.name | <code>String</code> | Name of the format to be referenced in your config.json |
| format.formatter | <code>function</code> | Function to perform the format. Takes 2 arguments, `dictionary` and `config` Must return a string. |
| format.formatter | <code>function</code> | Function to perform the format. Takes 2 arguments, `dictionary` and `config` Must return a string. Function is bound to its file object in the `platform.files` array. |

**Example**
```js
Expand Down
19 changes: 19 additions & 0 deletions docs/formats.md
Expand Up @@ -713,4 +713,23 @@ the sketchpalette plugin. To use this you should use the

* * *

### flutter/class.dart


Creates a Dart implementation file of a class with values

**Example**
```dart
import 'package:flutter/material.dart';
class StyleDictionary {
StyleDictionary._();
static const colorBrandPrimary = Color(0x00ff5fff);
static const sizeFontSizeMedium = 16.00;
static const contentFontFamily1 = "NewJune";
```

* * *


34 changes: 34 additions & 0 deletions docs/transform_groups.md
Expand Up @@ -182,3 +182,37 @@ Transforms:

* * *

### flutter


Transforms:

[attribute/cti](transforms.md#attributecti)
[name/cti/camel](transforms.md#namecticamel)
[color/hex8flutter](transforms.md#colorhex8flutter)
[size/flutter/remToDouble](transforms.md#sizeflutterremToDouble)
[content/flutter/literal](transforms.md#contentflutterliteral)
[asset/flutter/literal](transforms.md#assetflutterliteral)
[font/flutter/literal](transforms.md#fontflutterliteral)


* * *

### flutter-separate


Transforms:

[attribute/cti](transforms.md#attributecti)
[name/ti/camel](transforms.md#nameticamel)
[color/hex8flutter](transforms.md#colorhex8flutter)
[size/flutter/remToDouble](transforms.md#sizeflutterremToDouble)
[content/flutter/literal](transforms.md#contentflutterliteral)
[asset/flutter/literal](transforms.md#assetflutterliteral)
[font/flutter/literal](transforms.md#fontflutterliteral)

This is to be used if you want to have separate files per category and you don't want the category (e.g., color) as the lead value in the name of the property (e.g., StyleDictionaryColor.baseText instead of StyleDictionary.colorBaseText).


* * *

95 changes: 95 additions & 0 deletions docs/transforms.md
Expand Up @@ -212,6 +212,36 @@ Transforms the value into an RGB string
```


* * *

### color/hsl


Transforms the value into an HSL string or HSLA if alpha is present. Better browser support than color/hsl-4

```js
// Matches: prop.attributes.category === 'color'
// Returns:
"hsl(174, 100%, 29%)"
"hsl(174, 100%, 29%, .5)"
```


* * *

### color/hsl-4


Transforms the value into an HSL string, using fourth argument if alpha is present.

```js
// Matches: prop.attributes.category === 'color'
// Returns:
"hsl(174 100% 29%)"
"hsl(174 100% 29% / .5)"
```


* * *

### color/hex
Expand Down Expand Up @@ -594,3 +624,68 @@ Wraps the value in a double-quoted string to make a string literal.

* * *

### color/hex8flutter


Transforms the value into a Flutter Color object using 8-digit hex with the alpha chanel on start
```js
// Matches: prop.attributes.category === 'color'
// Returns:
Color(0xFF00FF5F)
```


* * *

### content/flutter/literal


Wraps the value in a double-quoted string to make a string literal.

```dart
// Matches: prop.attributes.category === 'content'
// Returns: "string"
```


* * *

### asset/flutter/literal


Wraps the value in a double-quoted string to make a string literal.

```dart
// Matches: prop.attributes.category === 'asset'
// Returns: "string"
```


* * *

### font/flutter/literal


Wraps the value in a double-quoted string to make a string literal.

```dart
// Matches: prop.attributes.category === 'font'
// Returns: "string"
```


* * *

### size/flutter/remToDouble


Scales the number by 16 to get to points for Flutter

```dart
// Matches: prop.attributes.category === 'size'
// Returns: 16.00
```


* * *

2 changes: 1 addition & 1 deletion examples/advanced/assets-base64-embed/package.json
Expand Up @@ -11,6 +11,6 @@
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/auto-rebuild-watcher/package.json
Expand Up @@ -17,6 +17,6 @@
"license": "Apache-2.0",
"devDependencies": {
"chokidar-cli": "^1.2.0",
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/component-cti/package.json
Expand Up @@ -15,6 +15,6 @@
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/create-react-app/package.json
Expand Up @@ -10,7 +10,7 @@
"styled-components": "^4.1.2"
},
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
},
"scripts": {
"build-dictionary": "style-dictionary build --config ./style-dictionary/config.json",
Expand Down
Expand Up @@ -19,6 +19,6 @@
"handlebars": "^4.0.12",
"lodash": "^4.17.11",
"pug": "^2.0.3",
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/custom-transforms/package.json
Expand Up @@ -15,6 +15,6 @@
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/multi-brand-multi-platform/package.json
Expand Up @@ -15,6 +15,6 @@
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
Expand Up @@ -19,7 +19,7 @@
},
"homepage": "https://github.com/dbanksdesign/style-dictionary-node#readme",
"devDependencies": {
"style-dictionary": "2.9.0",
"style-dictionary": "2.10.0",
"tinycolor2": "^1.4.1"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/npm-module/package.json
Expand Up @@ -16,6 +16,6 @@
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/referencing_aliasing/package.json
Expand Up @@ -15,6 +15,6 @@
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/s3/package.json
Expand Up @@ -15,6 +15,6 @@
"devDependencies": {
"aws-sdk": "^2.7.21",
"fs-extra": "^1.0.0",
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/tokens-deprecation/package.json
Expand Up @@ -16,6 +16,6 @@
"license": "Apache-2.0",
"devDependencies": {
"lodash": "^4.17.11",
"style-dictionary": "2.9.0"
"style-dictionary": "2.10.0"
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "style-dictionary",
"version": "2.9.0",
"version": "2.10.0",
"description": "Style once, use everywhere. A build system for creating cross-platform styles.",
"keywords": [
"style dictionary",
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.js
Expand Up @@ -3,7 +3,7 @@ const glob = require('glob');
const path = require('path');
const execSync = require('child_process').execSync;
const PACKAGE = require('../package.json');
const packageJSONs = glob.sync('./examples/**/package.json', {});
const packageJSONs = glob.sync('./examples/*/*/package.json', {});

packageJSONs.forEach(function(filePath) {
let pkg = fs.readJsonSync(filePath);
Expand Down

0 comments on commit a5b7636

Please sign in to comment.