Skip to content

Commit

Permalink
escript: Rename --prepend-path to --paths, support globs and multiple…
Browse files Browse the repository at this point in the history
… uses
  • Loading branch information
wojtekmach committed Jul 5, 2021
1 parent 04257cf commit 013dd4a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/ex_doc/cli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ defmodule ExDoc.CLI do
],
switches: [
language: :string,
paths: :keep,
proglang: :string,
source_ref: :string,
version: :boolean
Expand All @@ -45,8 +46,9 @@ defmodule ExDoc.CLI do

Code.prepend_path(source_beam)

if opts[:prepend_path] do
Code.prepend_path(opts[:prepend_path])
for path <- Keyword.get_values(opts, :paths),
path <- Path.wildcard(path) do
Code.prepend_path(path)
end

opts =
Expand Down Expand Up @@ -146,7 +148,9 @@ defmodule ExDoc.CLI do
See "Custom config" section below for more information.
-f, --formatter Docs formatter to use (html or epub), default: "html"
-p, --homepage-url URL to link to for the site name
--prepend-path Prepends the given path to Erlang code path
--paths Prepends the given path to Erlang code path. The path might contain a glob
pattern but in that case remember to quote it: --paths "_build/dev/lib/*/ebin".
This option can be given multiple times
--language Identify the primary language of the documents, its value must be
a valid [BCP 47](https://tools.ietf.org/html/bcp47) language tag, default: "en"
-l, --logo Path to the image logo of the project (only PNG or JPEG accepted)
Expand Down

0 comments on commit 013dd4a

Please sign in to comment.