Skip to content

Commit 7bdbefb

Browse files
author
José Valim
committed
Improve compile.protocols docs and make it public
1 parent ec0e7d8 commit 7bdbefb

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/mix/lib/mix/tasks/compile.protocols.ex

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ defmodule Mix.Tasks.Compile.Protocols do
33

44
@recursive true
55

6+
@shortdoc "Consolidates all protocols in all paths"
7+
68
@moduledoc ~S"""
79
Consolidates all protocols in all paths.
810
@@ -11,16 +13,18 @@ defmodule Mix.Tasks.Compile.Protocols do
1113
(defaults to "consolidated").
1214
1315
A new directory will be created with the consolidated
14-
protocol versions. Simply add it to your codepath to
15-
make use of it:
16+
protocol versions in the build directory for the given
17+
environment. Simply add it to your codepath to make use
18+
of it:
1619
17-
mix run -pa _build/dev/consolidated
20+
$ mix run -pa _build/dev/consolidated
1821
1922
You can verify a protocol is consolidated by checking
2023
its attributes:
2124
22-
elixir -pa _build/dev/consolidated -S \
23-
mix run -e "IO.puts Protocol.consolidated?(Enumerable)"
25+
$ iex -S mix run -pa _build/dev/consolidated
26+
iex> Protocol.consolidated?(Enumerable)
27+
true
2428
2529
"""
2630

0 commit comments

Comments
 (0)