amzn/style-dictionary

View on GitHub
scripts/handlebars/templates/actions.hbs

Summary

Maintainability
Test Coverage
# Actions

Actions provide a way to run custom build code such as generating binary assets like images.

Here are all the actions that come with the Style Dictionary build system. We try to include what most people might need. If you think we are missing some things, take a look at our [contributing docs](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md) and send us a pull request! If you have a specific need for your project, you can always create your own custom action with [`registerAction`](api.md?id=registeraction).

You use actions in your config file under platforms > [platform] > actions

```json
{
  "source": ["properties/**/*.json"],
  "platforms": {
    "android": {
      "transformGroup": "android",
      "files": [],
      "actions": ["copy_assets"]
    }
  }
}
```


----

## Pre-defined Actions

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

{{#namespace name="Actions"}}
{{>members~}}
{{/namespace}}