zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

absinthe.plug.graphiql.assets.remove.ex (413B)


      1 defmodule Mix.Tasks.Absinthe.Plug.Graphiql.Assets.Remove do
      2   use Mix.Task
      3 
      4   @shortdoc "Removes GraphiQL assets"
      5 
      6   def run(args) do
      7     opts = Mix.Absinthe.Plug.GraphiQL.AssetsTask.run(args)
      8     destroy_directory(opts[:local_directory])
      9   end
     10 
     11   defp destroy_directory(path) when is_binary(path) do
     12     Mix.shell().info([:red, "* removing ", :reset, Path.relative_to_cwd(path)])
     13     File.rm_rf!(path)
     14   end
     15 end