Skip to content

Commit

Permalink
docs: removing "so" (#337)
Browse files Browse the repository at this point in the history
fixes #328
  • Loading branch information
DarthOstrich authored May 15, 2020
1 parent 91e95f3 commit 619f5cf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ base64'ing files, running other build scripts, etc.
After you register a custom action, you then use that
action in a platform your config.json

You can perform operations on files generated by the style dictionary
as actions run after these files are generated.

Actions run after the files in a platform are generated, which allows you
to perform operations on files generated by the style dictionary.
Actions are run sequentially, if you write synchronous code then
it will block other actions, or if you use asynchronous code like Promises
it will not block.
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Style Dictionary takes all the files it found and performs a deep merge. This al

## 4. Iterate over the platforms

For each platform defined in your [config](config.md), Style Dictionary will do a few steps to get it ready to be consumed on that platform. Everything that happens in a platform is non-destructive; you don't need to worry about one platform affecting another.
For each platform defined in your [config](config.md), Style Dictionary will do a few steps to get it ready to be consumed on that platform. You don't need to worry about one platform affecting another because everything that happens in a platform is non-destructive

## 4a. Transform the tokens

Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ You can find out more about creating configurations in JS in our documentation a
| Attribute | Type | Description |
| :--- | :--- | :--- |
| include | Array[String] (optional) | An array of path [globs](https://github.com/isaacs/node-glob) to Style Dictionary property files that contain default styles. The Style Dictionary uses this as a base collection of properties. The properties found using the "source" attribute will overwrite properties found using include. |
| source | Array[String] | An array of paths that can be [globs](https://github.com/isaacs/node-glob) to JSON files that contain style properties. This allows you to separate your properties into multiple files as Style Dictionary will do a deep merge of all of the JSON files to create the dictionary. |
| source | Array[String] | An array of path [globs](https://github.com/isaacs/node-glob) to JSON files that contain style properties. The Style Dictionary will do a deep merge of all of the JSON files, allowing you to separate your properties into multiple files. |
| platforms | Object | An object containing platform config objects that describe how the Style Dictionary should build for that platform. You can add any arbitrary attributes on this object that will get passed to formats and actions (more on these in a bit). This is useful for things like build paths, name prefixes, variable names, etc. |
| platform.transforms | Array[String] (optional) | An array of [transforms](transforms.md) to be performed on the style properties object. These transform the properties in a non-destructive way as each platform can transform the properties in a unique manner. Transforms to apply sequentially to all properties. Can be a built-in one or you can create your own. |
| platform.transforms | Array[String] (optional) | An array of [transforms](transforms.md) to be performed on the style properties object. These will transform the properties in a non-destructive way, allowing each platform to transform the properties. Transforms to apply sequentially to all properties. Can be a built-in one or you can create your own. |
| platform.transformGroup | String (optional) | A string that maps to an array of transforms. This makes it easier to reference transforms by grouping them together. You must either define this or [transforms](transforms.md). |
| platform.buildPath | String (optional) | Base path to build the files, must end with a trailing slash. |
| platform.files | Array (optional) | Files to be generated for this platform. |
Expand Down
4 changes: 2 additions & 2 deletions docs/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ There is an extensive (but not exhaustive) list of [included formats](#pre-defin

### Format configuration

Formats can take configuration to make them more flexible. This allows you to re-use the same format multiple times with different configurations or to allow the format to use data not defined in the tokens themselves. To configure a format, add extra attributes on the file object in your configuration like the following:
Formats are flexible and may accept configuration options. This allows you to re-use the same format multiple times with different configurations or to allow the format to use data not defined in the tokens themselves. To configure a format, add extra attributes on the file object in your configuration as written below:

```json
{
Expand Down Expand Up @@ -73,7 +73,7 @@ A special file configuration is `filter`, which will filter the tokens before th

### Creating formats

You can create custom formats using the [`registerFormat`](api.md#registerformat) function. If you want to add configuration to your custom format, `this` is bound to the file object. Using this, you can access attributes on the file object with `this.myCustomAttribute` if the file object looks like:
You can create custom formats using the [`registerFormat`](api.md#registerformat) function. If you want to add configuration to your custom format, `this` is bound to the file object allowing you access to the attributes on the file object with `this.myCustomAttribute` if the file object looks like:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/using_the_npm_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Style Dictionary npm module exposes an [API](api.md) to interact with style


# Installation
To use the npm module, install it like a normal npm dependency. This is a build tool therefore you are most likely going to want to save it as a dev dependency (The -D option):
To use the npm module, install it like a normal npm dependency. You are most likely going to want to save it as a dev dependency (The -D option) because it's a build tool:
```bash
$ npm install -D style-dictionary
```
Expand Down

0 comments on commit 619f5cf

Please sign in to comment.