mix iconex.download (iconex v0.1.0)

Copy Markdown View Source

Downloads an icon set's data from npm and writes it in iconex's format.

mix iconex.download SET [--version VERSION] [--output PATH]

SET is one of the ids in Iconex.Set.ids/0, such as lucide.

Options

  • --version - the version of the set's npm package to fetch (see Iconex.Set). Defaults to the latest version published on npm.
  • --output - where to write the file. Defaults to priv/sets/SET.json inside the iconex repository, or, in a host application, to config :iconex, SET: [data_path: ...] when set and priv/iconex/SET.json otherwise.

Using newer icons in a host application

Point iconex at the downloaded file in config/config.exs (the path must be absolute):

config :iconex, lucide: [data_path: Path.expand("../priv/iconex/lucide.json", __DIR__)]

then recompile the dependency with mix deps.compile iconex --force. Once the config is in place, this task recompiles iconex automatically after each download. The task never writes into deps/iconex.