From d1fceaf75fead0e527ba1ca43ec617c6dad35d68 Mon Sep 17 00:00:00 2001 From: Shritesh Date: Wed, 25 Sep 2019 14:16:56 -0500 Subject: [PATCH] Don't depend on floki in prod (#28) * Set @preferred_cli_env for Convert Task to :dev * Set floki dep to :dev and :test, bump nimble_parsec --- lib/mix/tasks/temple.convert.ex | 1 + mix.exs | 2 +- mix.lock | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mix/tasks/temple.convert.ex b/lib/mix/tasks/temple.convert.ex index 0ff870d..9375dbc 100644 --- a/lib/mix/tasks/temple.convert.ex +++ b/lib/mix/tasks/temple.convert.ex @@ -1,5 +1,6 @@ defmodule Mix.Tasks.Temple.Convert do use Mix.Task + @preferred_cli_env :dev @shortdoc "Converts HTML to Temple syntax" @moduledoc """ Converts HTML to Temple syntax diff --git a/mix.exs b/mix.exs index a56940d..5184e77 100644 --- a/mix.exs +++ b/mix.exs @@ -60,7 +60,7 @@ defmodule Temple.MixProject do {:html_sanitize_ex, "~> 1.3", only: [:dev, :test], runtime: false}, {:phoenix, "~> 1.4", optional: true}, {:plug, "~> 1.8", optional: true}, - {:floki, "~> 0.23.0"} + {:floki, "~> 0.23.0", only: [:dev, :test], runtime: false} ] end end diff --git a/mix.lock b/mix.lock index 3c43801..08662ac 100644 --- a/mix.lock +++ b/mix.lock @@ -10,7 +10,7 @@ "makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"}, "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"}, "mochiweb": {:hex, :mochiweb, "2.18.0", "eb55f1db3e6e960fac4e6db4e2db9ec3602cc9f30b86cd1481d56545c3145d2e", [:rebar3], [], "hexpm"}, - "nimble_parsec": {:hex, :nimble_parsec, "0.5.1", "c90796ecee0289dbb5ad16d3ad06f957b0cd1199769641c961cfe0b97db190e0", [], [], "hexpm"}, + "nimble_parsec": {:hex, :nimble_parsec, "0.5.1", "c90796ecee0289dbb5ad16d3ad06f957b0cd1199769641c961cfe0b97db190e0", [:mix], [], "hexpm"}, "phoenix": {:hex, :phoenix, "1.4.10", "619e4a545505f562cd294df52294372d012823f4fd9d34a6657a8b242898c255", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.8.1 or ~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"}, "phoenix_ecto": {:hex, :phoenix_ecto, "4.0.0", "c43117a136e7399ea04ecaac73f8f23ee0ffe3e07acfcb8062fe5f4c9f0f6531", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "phoenix_html": {:hex, :phoenix_html, "2.13.3", "850e292ff6e204257f5f9c4c54a8cb1f6fbc16ed53d360c2b780a3d0ba333867", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},