Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mix.exs #112

Merged
merged 3 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Config

config :phoenix, :json_library, Jason
config :primer_live, env: Mix.env()
11 changes: 7 additions & 4 deletions lib/helpers/attribute_helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ defmodule PrimerLive.Helpers.AttributeHelpers do
uppercase letters, digits, etc...
"""
def random_string(len \\ 12) when is_integer(len) and len > 0 do
(for _ <- 1..len, do: rand_uniform(32, 126))
for(_ <- 1..len, do: rand_uniform(32, 126))
|> List.to_string()
end

Expand All @@ -329,8 +329,10 @@ defmodule PrimerLive.Helpers.AttributeHelpers do
# distributed in the range `n <= Y <= m`.
# (Because we just shift X to the right).
defp rand_uniform(n, m) do
:rand.uniform(m - n + 1) # random X
|> Kernel.+(n - 1) # shift X to the right to get Y
# random X
:rand.uniform(m - n + 1)
# shift X to the right to get Y
|> Kernel.+(n - 1)
end

@doc """
Expand Down Expand Up @@ -960,7 +962,8 @@ defmodule PrimerLive.Helpers.AttributeHelpers do
touch_layer_attrs =
append_attributes([
["data-touch": ""],
!is_nil(assigns[:phx_click_touch]) && !is_modal && ["phx-click": assigns[:phx_click_touch]]
!is_nil(assigns[:phx_click_touch]) && !is_modal &&
["phx-click": assigns[:phx_click_touch]]
])

focus_wrap_id = "focus-wrap-#{id || generated_id}"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 2 additions & 7 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@ defmodule PrimerLive.MixProject do
def project do
[
app: :primer_live,
version: "0.4.0",
version: "0.4.1",
homepage_url: "https://github.com/ArthurClemens/primer_live",
description: description(),
package: package(),
aliases: aliases(),
name: "PrimerLive",
deps: deps(),
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env())
]
end

# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]

defp description() do
"A collection of function components that implements GitHub's Primer Design System."
end
Expand All @@ -35,7 +30,7 @@ defmodule PrimerLive.MixProject do
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ecto, "~> 3.10", only: :test, runtime: false},
{:ecto, "~> 3.10", runtime: false},
{:ecto_sql, "~> 3.10", only: :test, runtime: false},
{:esbuild, "~> 0.7", only: :dev},
{:ex_doc, "~> 0.30", only: :dev},
Expand Down
Loading