Skip to content

Commit 017abba

Browse files
kianmengprincemaple
authored andcommitted
Misc doc changes
Besides other documentation changes, this commit ensures the generated HTML doc for HexDocs.pm will become the source of truth for this Elixir library and leverage on latest features of ExDoc.
1 parent ac3bbb0 commit 017abba

File tree

6 files changed

+68
-33
lines changed

6 files changed

+68
-33
lines changed

.formatter.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

.gitignore

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
# The directory Mix will write compiled artifacts to.
2-
/_build
2+
/_build/
33

44
# If you run "mix test --cover", coverage assets end up here.
5-
/cover
5+
/cover/
66

77
# The directory Mix downloads your dependencies sources to.
8-
/deps
8+
/deps/
99

10-
# Where 3rd-party dependencies like ExDoc output generated docs.
11-
/doc
10+
# Where third-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Ignore .fetch files in case you like to edit your project deps locally.
14+
/.fetch
1215

1316
# If the VM crashes, it generates a dump, let's ignore it too.
1417
erl_crash.dump
1518

1619
# Also ignore archive artifacts (built via "mix archive.build").
1720
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
qex-*.tar
24+
25+
# Temporary files, for example, from tests.
26+
/tmp/

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
## v0.5.0
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## v0.5.0 (2018-09-04)
29

310
### Added
411
- `first/1`, `first!/1`, `last/1`, `last!/1`

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# The MIT License
22

33
Copyright (c) 2018 Po Chen
44

README.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# Qex [![Hex.pm](https://img.shields.io/hexpm/v/qex.svg)](https://hex.pm/packages/qex) [![Documentation](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/qex/Qex.html)
1+
# Qex
2+
3+
[![Elixir CI](https://github.com/princemaple/elixir-queue/actions/workflows/elixir.yml/badge.svg)](https://github.com/princemaple/elixir-queue/actions/workflows/elixir.yml)
4+
[![Module Version](https://img.shields.io/hexpm/v/qex.svg)](https://hex.pm/packages/qex)
5+
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/qex/)
6+
[![Total Download](https://img.shields.io/hexpm/dt/qex.svg)](https://hex.pm/packages/qex)
7+
[![License](https://img.shields.io/hexpm/l/qex.svg)](https://github.com/princemaple/elixir-queue/blob/master/LICENSE.md)
8+
[![Last Updated](https://img.shields.io/github/last-commit/princemaple/elixir-queue.svg)](https://github.com/princemaple/elixir-queue/commits/master)
29

310
A `:queue` wrapper with improvements in API and addition of Protocol implementations
411

@@ -15,15 +22,17 @@ Parameters are re-ordered to better suit Elixir's awesome `|>`
1522

1623
The package can be installed as:
1724

18-
1. Add `qex` to your list of dependencies in `mix.exs`:
25+
1. Add `:qex` to your list of dependencies in `mix.exs`:
1926

20-
```elixir
21-
def deps do
22-
[{:qex, "~> 0.5"}]
23-
end
24-
```
27+
```elixir
28+
def deps do
29+
[
30+
{:qex, "~> 0.5"}
31+
]
32+
end
33+
```
2534

26-
2. Run `mix deps.get`
35+
2. Run `mix deps.get`
2736

2837
## How to use
2938

@@ -173,3 +182,10 @@ iex> Qex.last!(q1)
173182
## Why not "Queue"?
174183

175184
The name is taken... [Hex link](https://hex.pm/packages/queue)
185+
186+
## Copyright and License
187+
188+
Copyright (c) 2018 Po Chen
189+
190+
This work is free. You can redistribute it and/or modify it under the
191+
terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.

mix.exs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@ defmodule Qex.Mixfile do
77
def project do
88
[
99
app: :qex,
10+
name: "Qex",
1011
version: @version,
1112
elixir: "~> 1.9",
1213
build_embedded: Mix.env() == :prod,
1314
start_permanent: Mix.env() == :prod,
1415
deps: deps(),
15-
16-
# Hex
17-
description: description(),
18-
package: package(),
19-
20-
# Docs
21-
name: "Qex",
22-
source_url: @source_url,
23-
homepage_url: @source_url,
24-
docs: docs()
16+
docs: docs(),
17+
package: package()
2518
]
2619
end
2720

@@ -33,25 +26,31 @@ defmodule Qex.Mixfile do
3326
[{:ex_doc, ">= 0.0.0", only: :docs, runtime: false}]
3427
end
3528

36-
defp description do
37-
"A `:queue` wrapper with improvements in API and addition of Protocol implementations"
38-
end
39-
4029
defp package do
4130
[
31+
description:
32+
"A `:queue` wrapper with improvements in API and addition of Protocol implementations",
4233
licenses: ["MIT"],
4334
maintainers: ["Po Chen"],
44-
links: %{GitHub: "https://github.com/princemaple/elixir-queue"}
35+
links: %{
36+
Changelog: "https://hexdocs.pm/qex/changelog.html",
37+
GitHub: @source_url
38+
}
4539
]
4640
end
4741

4842
defp docs do
4943
[
50-
source_ref: "v#{@version}",
51-
main: "Qex",
44+
extras: [
45+
"CHANGELOG.md": [],
46+
"LICENSE.md": [title: "License"],
47+
"README.md": [title: "Overview"]
48+
],
49+
main: "readme",
5250
canonical: "http://hexdocs.pm/qex",
51+
homepage_url: @source_url,
5352
source_url: @source_url,
54-
extras: ["CHANGELOG.md"]
53+
source_ref: "v#{@version}"
5554
]
5655
end
5756
end

0 commit comments

Comments
 (0)