From 9140cf7104ccc4fbbb8caec16391f265fd1cd79e Mon Sep 17 00:00:00 2001 From: Henry Popp Date: Fri, 30 Aug 2024 19:03:01 -0500 Subject: [PATCH] docs: minor tweaks --- lib/pane.ex | 31 +++++++++++++++++++++++++++---- mix.exs | 27 +++++++++------------------ 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/lib/pane.ex b/lib/pane.ex index dd751cd..b4baae9 100644 --- a/lib/pane.ex +++ b/lib/pane.ex @@ -5,20 +5,43 @@ defmodule Pane do ## Usage - iex> data = File.read!("mix.exs") # Or some other really long string - iex> Pane.console(data) - - ![console][/docs/console.png] + ``` + iex> data = File.read!("mix.exs") # Or some other really long string + iex> Pane.console(data) + ``` + + ``` + defmodule Pane.Mixfile do + use Mix.Project + + @source_url "https://github.com/codedge-llc/pane" + @version "0.5.0" + + def project do + [ + app: :pane, + build_embedded: Mix.env() == :prod, + deps: deps(), + dialyzer: dialyzer(), + docs: docs(), + elixir: "~> 1.13", + name: "Pane", + + [1 of 5] (j)next (k)prev (f)first (l)last (q)quit + ``` ## Available Commands * `j` - Next page * `k` - Previous page + * `f` - First page + * `l` - Last page * `q` - Quit """ @doc ~S""" Paginates data and starts a pseudo-interactive console. """ + @spec console(any) :: no_return def console(data) when is_binary(data) do if IO.ANSI.enabled?() do start_and_recv(data) diff --git a/mix.exs b/mix.exs index 4ceb289..47cc2ea 100644 --- a/mix.exs +++ b/mix.exs @@ -14,14 +14,7 @@ defmodule Pane.Mixfile do elixir: "~> 1.13", name: "Pane", package: package(), - preferred_cli_env: [ - coveralls: :test, - "coveralls.detail": :test, - "coveralls.post": :test, - "coveralls.html": :test - ], start_permanent: Mix.env() == :prod, - test_coverage: [tool: ExCoveralls], version: @version ] end @@ -34,7 +27,6 @@ defmodule Pane.Mixfile do [ {:credo, "~> 1.0", only: [:dev], runtime: false}, {:dialyxir, "~> 1.0", only: [:dev], runtime: false}, - {:excoveralls, "~> 0.7", only: [:test], runtime: false}, {:ex_doc, ">= 0.0.0", only: [:dev], runtime: false} ] end @@ -43,14 +35,12 @@ defmodule Pane.Mixfile do [ extras: [ "CHANGELOG.md", - "LICENSE.md": [title: "License"], - "README.md": [title: "Overview"] + "LICENSE.md": [title: "License"] ], - main: "readme", - source_url: @source_url, + formatters: ["html"], + main: "Pane", source_ref: "v#{@version}", - api_reference: false, - formatters: ["html"] + source_url: @source_url ] end @@ -62,14 +52,15 @@ defmodule Pane.Mixfile do defp package do [ - description: "Paginated printer for IEx", + description: "Paginated printer for IEx.", files: ["lib", "mix.exs", "README*", "LICENSE*", "CHANGELOG*"], - maintainers: ["Henry Popp"], licenses: ["MIT"], links: %{ "Changelog" => "https://hexdocs.pm/pane/changelog.html", - "GitHub" => "https://github.com/codedge-llc/pane" - } + "GitHub" => "https://github.com/codedge-llc/pane", + "Sponsor" => "https://github.com/sponsors/codedge-llc" + }, + maintainers: ["Henry Popp"] ] end end