Skip to content

Commit

Permalink
Change to lfe namespace and update documentation
Browse files Browse the repository at this point in the history
Close #39
  • Loading branch information
yurrriq committed Jan 17, 2016
1 parent 4f1c55a commit d4918da
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 50 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Finally, add Lodox to your `plugins` list:
[% ...
{lodox, ".*",
{git, "git://github.com/quasiquoting/lodox.git",
{tag, "0.10.0"}}}]}.
{tag, "0.11.0"}}}]}.
```

The recommended place for the Lodox plugin entry is the global [rebar3](https://github.com/rebar/rebar3) config, `~/.config/rebar3/rebar.config`,
Expand All @@ -49,18 +49,18 @@ rebar3 compile
Then, to invoke Lodox, simply run:

```sh
rebar3 lodox
rebar3 lfe lodox
```

Alternatively, you can `do` both at once:

```sh
rebar3 do compile, lodox
rebar3 do compile, lfe lodox
```

If all goes well, the output will look something like:

Generated lodox v0.10.0 docs in /path/to/lodox/doc
Generated lodox v0.11.0 docs in /path/to/lodox/doc

And, as promised, [generated documentation](http://quasiquoting.org/lodox/) will be in the `doc` subdirectory of
your project.
Expand All @@ -70,7 +70,7 @@ Optionally, you can add Lodox as a `compile` [post-hook](https://www.rebar3.org/
```erlang
{provider_hooks,
[{pre, [{compile, {lfe, compile}}]},
{post, [{compile, lodox}]}]}.
{post, [{compile, {lfe, lodox}]}]}.
```

# License
Expand Down
2 changes: 1 addition & 1 deletion doc
22 changes: 11 additions & 11 deletions org/Lodox.org
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ For markdown: [[https://github.com/erlware/erlmarkdown][erlmarkdown]].
#+BEGIN_SRC lfe
(defun namespace ()
"The namespace in which `lodox` is registered, `default`."
'default)
'lfe)
#+END_SRC

- /name/: The 'user friendly' name of the task.
Expand Down Expand Up @@ -301,16 +301,16 @@ and sets up the state.
#+BEGIN_SRC lfe
(defun init (state)
"Initiate the Lodox provider."
(rebar_api:debug "Initializing {default, lodox}" '())
(let* ((opts `(#(name ,(provider-name)) ; The 'user friendly' name
#(module ,(MODULE)) ; The module implementation
#(namespace ,(namespace)) ; Plugin namespace
#(opts ()) ; List of plugin options
#(deps ,(deps)) ; The list of dependencies
#(example "rebar3 lodox") ; How to use the plugin
#(short_desc ,(short-desc)) ; A one-line description
#(desc ,(desc)) ; A longer description
#(bare true))) ; Task can be run by user
(rebar_api:debug "Initializing {~p, ~p}" `[,(namespace) ,(provider-name)])
(let* ((opts `(#(name ,(provider-name)) ; The 'user friendly' name
#(module ,(MODULE)) ; The module implementation
#(namespace ,(namespace)) ; Plugin namespace
#(opts []) ; List of plugin options
#(deps ,(deps)) ; The list of dependencies
#(example "rebar3 lfe lodox") ; How to use the plugin
#(short_desc ,(short-desc)) ; A one-line description
#(desc ,(desc)) ; A longer description
#(bare true))) ; Task can be run by user
(provider (providers:create opts)))
(let ((state* (rebar_state:add_provider state provider)))
(rebar_api:debug "Initialized lodox" '())
Expand Down
28 changes: 14 additions & 14 deletions org/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ branch = gh-pages
```erlang
{application, 'lodox',
[{description, "The LFE rebar3 Lodox plugin"},
{vsn, "0.10.0"},
{vsn, "0.11.0"},
{modules, [lodox,
'lodox-html-writer', 'lodox-p', 'lodox-parse', 'lodox-util',
'unit-lodox-tests']},
Expand All @@ -120,7 +120,7 @@ branch = gh-pages
"https://github.com/quasiquoting/lodox/blob/master/{filepath}#L{line}"},
{dependency, {lodox,
{git, "git://github.com/quasiquoting/lodox.git",
{tag, "0.10.0"}}}}]},
{tag, "0.11.0"}}}}]},
{links,
[{"Homepage", "https://github.com/quasiquoting/lodox"},
{"Documentation", "http://quasiquoting.org/lodox"}]}]}.
Expand Down Expand Up @@ -199,7 +199,7 @@ For markdown: [erlmarkdown](https://github.com/erlware/erlmarkdown).
```lfe
(defun namespace ()
"The namespace in which `lodox` is registered, `default`."
'default)
'lfe)
```

- *name*: The 'user friendly' name of the task.
Expand Down Expand Up @@ -242,16 +242,16 @@ and sets up the state.
```lfe
(defun init (state)
"Initiate the Lodox provider."
(rebar_api:debug "Initializing {default, lodox}" '())
(let* ((opts `(#(name ,(provider-name)) ; The 'user friendly' name
#(module ,(MODULE)) ; The module implementation
#(namespace ,(namespace)) ; Plugin namespace
#(opts ()) ; List of plugin options
#(deps ,(deps)) ; The list of dependencies
#(example "rebar3 lodox") ; How to use the plugin
#(short_desc ,(short-desc)) ; A one-line description
#(desc ,(desc)) ; A longer description
#(bare true))) ; Task can be run by user
(rebar_api:debug "Initializing {~p, ~p}" `[,(namespace) ,(provider-name)])
(let* ((opts `(#(name ,(provider-name)) ; The 'user friendly' name
#(module ,(MODULE)) ; The module implementation
#(namespace ,(namespace)) ; Plugin namespace
#(opts []) ; List of plugin options
#(deps ,(deps)) ; The list of dependencies
#(example "rebar3 lfe lodox") ; How to use the plugin
#(short_desc ,(short-desc)) ; A one-line description
#(desc ,(desc)) ; A longer description
#(bare true))) ; Task can be run by user
(provider (providers:create opts)))
(let ((state* (rebar_state:add_provider state provider)))
(rebar_api:debug "Initialized lodox" '())
Expand Down Expand Up @@ -828,7 +828,7 @@ Use [pandoc] if available, otherwise [erlmarkdown].
```commonlisp
'#m(name #\"lodox\"
version \"0.10.0\"
version \"0.11.0\"
description \"The LFE rebar3 Lodox plugin\"
documents ()
modules {{list of maps of module metadata}}
Expand Down
8 changes: 4 additions & 4 deletions org/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ rebar3 compile
Then, to invoke Lodox, simply run:
#+NAME: lodox
#+BEGIN_SRC sh
rebar3 lodox
rebar3 lfe lodox
#+END_SRC

Alternatively, you can ~do~ both at once:
#+BEGIN_SRC sh
rebar3 do compile, lodox
rebar3 do compile, lfe lodox
#+END_SRC

#+NAME: last-line-only
Expand All @@ -91,7 +91,7 @@ cd .. && <<lodox>> | <<last-line-only>> | <<obfuscate-path>>
#+END_SRC

#+RESULTS: generate-docs
: Generated lodox v0.10.0 docs in /path/to/lodox/doc
: Generated lodox v0.11.0 docs in /path/to/lodox/doc

#+NAME: but-actually-though
#+BEGIN_SRC sh :exports results :results output silent
Expand All @@ -108,7 +108,7 @@ Optionally, you can add Lodox as a =compile= [[https://www.rebar3.org/v3.0/docs/
#+BEGIN_SRC erlang
{provider_hooks,
[{pre, [{compile, {lfe, compile}}]},
{post, [{compile, lodox}]}]}.
{post, [{compile, {lfe, lodox}]}]}.
#+END_SRC

#+INCLUDE: LICENSE.org :minlevel 1
2 changes: 1 addition & 1 deletion org/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.11.0
2 changes: 1 addition & 1 deletion src/lodox-parse.lfe
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
```commonlisp
'#m(name #\"lodox\"
version \"0.10.0\"
version \"0.11.0\"
description \"The LFE rebar3 Lodox plugin\"
documents ()
modules {{list of maps of module metadata}}
Expand Down
4 changes: 2 additions & 2 deletions src/lodox.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{application, 'lodox',
[{description, "The LFE rebar3 Lodox plugin"},
{vsn, "0.10.0"},
{vsn, "0.11.0"},
{modules, [lodox,
'lodox-html-writer', 'lodox-p', 'lodox-parse', 'lodox-util',
'unit-lodox-tests']},
Expand All @@ -16,7 +16,7 @@
"https://github.com/quasiquoting/lodox/blob/master/{filepath}#L{line}"},
{dependency, {lodox,
{git, "git://github.com/quasiquoting/lodox.git",
{tag, "0.10.0"}}}}]},
{tag, "0.11.0"}}}}]},
{links,
[{"Homepage", "https://github.com/quasiquoting/lodox"},
{"Documentation", "http://quasiquoting.org/lodox"}]}]}.
22 changes: 11 additions & 11 deletions src/lodox.lfe
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

(defun namespace ()
"The namespace in which `lodox` is registered, `default`."
'default)
'lfe)

(defun provider-name ()
"The 'user friendly' name of the task, `lodox`."
Expand All @@ -39,16 +39,16 @@

(defun init (state)
"Initiate the Lodox provider."
(rebar_api:debug "Initializing {default, lodox}" '())
(let* ((opts `(#(name ,(provider-name)) ; The 'user friendly' name
#(module ,(MODULE)) ; The module implementation
#(namespace ,(namespace)) ; Plugin namespace
#(opts ()) ; List of plugin options
#(deps ,(deps)) ; The list of dependencies
#(example "rebar3 lodox") ; How to use the plugin
#(short_desc ,(short-desc)) ; A one-line description
#(desc ,(desc)) ; A longer description
#(bare true))) ; Task can be run by user
(rebar_api:debug "Initializing {~p, ~p}" `[,(namespace) ,(provider-name)])
(let* ((opts `(#(name ,(provider-name)) ; The 'user friendly' name
#(module ,(MODULE)) ; The module implementation
#(namespace ,(namespace)) ; Plugin namespace
#(opts []) ; List of plugin options
#(deps ,(deps)) ; The list of dependencies
#(example "rebar3 lfe lodox") ; How to use the plugin
#(short_desc ,(short-desc)) ; A one-line description
#(desc ,(desc)) ; A longer description
#(bare true))) ; Task can be run by user
(provider (providers:create opts)))
(let ((state* (rebar_state:add_provider state provider)))
(rebar_api:debug "Initialized lodox" '())
Expand Down

0 comments on commit d4918da

Please sign in to comment.