Implement mix update script
This commit is contained in:
22
lib/mix/tasks/heroicons/update.ex
Normal file
22
lib/mix/tasks/heroicons/update.ex
Normal file
@ -0,0 +1,22 @@
|
||||
defmodule Mix.Tasks.Heroicons.Update do
|
||||
@moduledoc """
|
||||
Update heroicons.
|
||||
By default, it downloads the latest version but you
|
||||
can configure it in your config files, such as:
|
||||
config :heroicons, :version, "#{Heroicons.latest_version()}"
|
||||
"""
|
||||
|
||||
@shortdoc "Update heroicons assets"
|
||||
|
||||
use Mix.Task
|
||||
|
||||
@impl true
|
||||
def run(args) do
|
||||
{_opts, args} = OptionParser.parse!(args, strict: [])
|
||||
|
||||
case args do
|
||||
[] -> Heroicons.update()
|
||||
_ -> Mix.raise("Invalid arguments, expected: mix heroicons.update")
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user