# `Expresso.IconTransformer`
[🔗](https://github.com/rellen/expresso/blob/main/lib/expresso/icon_transformer.ex#L1)

The Spark transformer of the icons of a deck

It runs one time for each deck module at compile time, after
`Expresso.PathTransformer`, which makes the `root` option an absolute path.
It reads each SVG file of the `icons` option of the deck through
`Expresso.DeckFile`, so the watch mode renders the deck again after a change
to a file. Then it puts the SVG into each `icon` element and into each node of a tree
with the `icon` option, and it replaces
each `:icon:name:` in the text of a text area and of an item with the SVG.

A file that it cannot read, a file without an `svg` element and a name that
no icon has are errors, which become a `Spark.Error.DslError`.

# `after?`

```elixir
@spec after?(module()) :: boolean()
```

Run this transformer after the path transformer, which makes the root absolute

# `after_compile?`

# `before?`

# `transform`

```elixir
@spec transform(map()) :: {:ok, map()} | {:error, Spark.Error.DslError.t()}
```

Put the SVG of each icon into the elements of the deck

---

*Consult [api-reference.md](api-reference.md) for complete listing*
