Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alex Gleason
pleroma
Commits
511d93fa
Commit
511d93fa
authored
5 years ago
by
Alexander Strizhakov
Browse files
Options
Downloads
Patches
Plain Diff
mix docs generates config.md
parent
67e43009
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/mix/tasks/pleroma/docs.ex
+40
-0
40 additions, 0 deletions
lib/mix/tasks/pleroma/docs.ex
mix.exs
+2
-1
2 additions, 1 deletion
mix.exs
with
42 additions
and
1 deletion
lib/mix/tasks/pleroma/docs.ex
0 → 100644
+
40
−
0
View file @
511d93fa
defmodule
Mix
.
Tasks
.
Pleroma
.
Docs
do
use
Mix
.
Task
import
Mix
.
Pleroma
@shortdoc
"Generates docs from descriptions.exs"
@moduledoc
"""
Generates docs from `descriptions.exs`.
Supports two formats: `markdown` and `json`.
## Generate markdown docs
`mix pleroma.docs`
## Generate json docs
`mix pleroma.docs json`s
"""
def
run
([
"json"
])
do
do_run
(
Pleroma
.
Docs
.
JSON
)
end
def
run
(
_
)
do
do_run
(
Pleroma
.
Docs
.
Markdown
)
end
defp
do_run
(
implementation
)
do
start_pleroma
()
descriptions
=
Config
.
Reader
.
read!
(
"config/description.exs"
)
{
:ok
,
file_path
}
=
Pleroma
.
Docs
.
Formatter
.
process
(
implementation
,
descriptions
[
:pleroma
][
:config_description
]
)
Mix
.
shell
()
.
info
([
:green
,
"Markdown docs successfully generated to
#{
file_path
}
."
])
end
end
This diff is collapsed.
Click to expand it.
mix.exs
+
2
−
1
View file @
511d93fa
...
...
@@ -172,7 +172,8 @@ defp aliases do
"ecto.rollback"
:
[
"pleroma.ecto.rollback"
],
"ecto.setup"
:
[
"ecto.create"
,
"ecto.migrate"
,
"run priv/repo/seeds.exs"
],
"ecto.reset"
:
[
"ecto.drop"
,
"ecto.setup"
],
test:
[
"ecto.create --quiet"
,
"ecto.migrate"
,
"test"
]
test:
[
"ecto.create --quiet"
,
"ecto.migrate"
,
"test"
],
docs:
[
"pleroma.docs"
,
"docs"
]
]
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment