Skip to content

Commit

Permalink
docs: docs for tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Mar 1, 2024
1 parent a16bf26 commit 9194893
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 9 deletions.
8 changes: 7 additions & 1 deletion lib/mix/tasks/blend/clean.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
defmodule Mix.Tasks.Blend.Clean do
@shortdoc "Cleans blend build artifacts"

@moduledoc """
A task to clean any stale lockfiles and blend build artifacts under the
`blend/` folder.
"""

use Mix.Task

@shortdoc "Cleans blend build artifacts"
@requirements ["app.config"]

@impl true
Expand Down
11 changes: 10 additions & 1 deletion lib/mix/tasks/blend/get.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
defmodule Mix.Tasks.Blend.Get do
@shortdoc "Generates lockfiles from blend.exs"

@moduledoc """
A task to resolve your blends and generate lockfiles.
That is to say, have blend read your defined blends in `blend.exs` and generate
a lockfile for each blend by combining each specific blend overrides with your package
dependencies in `mix.exs`.
"""

use Mix.Task

@shortdoc "Generates lockfiles from blend.exs"
@requirements ["app.config"]

@impl true
Expand Down
16 changes: 14 additions & 2 deletions lib/mix/tasks/blend/init.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
defmodule Mix.Tasks.Blend.Init do
use Mix.Task

@shortdoc "Initializes an empty blend.exs file"

@moduledoc """
A task to generates an empty blend.exs file for you
to define your blends, if you don't yet have one.
It is created with a commented example in it.
```
$ mix blend.init
Successfully created blend.exs file
```
"""

use Mix.Task

@impl true
def run(_args) do
Blend.init()
Expand Down
15 changes: 13 additions & 2 deletions lib/mix/tasks/blend/list.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
defmodule Mix.Tasks.Blend.List do
use Mix.Task

@shortdoc "Lists blend names defined in blend.exs file"

@moduledoc """
A task to list to quickly get a list of blend names you have defined in
your blend.exs file.
```
$ mix blend.list
plug_crypto_1
plug_crypto_2
```
"""

use Mix.Task

@impl true
def run(_args) do
Blend.blends()
Expand Down
10 changes: 8 additions & 2 deletions lib/mix/tasks/blend/premix.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
defmodule Mix.Tasks.Blend.Premix do
use Mix.Task

@shortdoc "Generates premix.exs file"

@moduledoc """
Task to generate the `premix.exs` file, which helps confuguring your
package project to easily run any mix task against a specific blend
lockfile.
"""

use Mix.Task

@impl true
def run(_args) do
Blend.premix()
Expand Down
10 changes: 9 additions & 1 deletion lib/mix/tasks/blend/update.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
defmodule Mix.Tasks.Blend.Update do
@shortdoc "Updates lockfiles from blend.exs"

@moduledoc """
A task to update your blend lockfiles dependencies.
That means, trying to get all the dependencies in each lockfile to their most recent
version possible respecting the defined version constraints.
"""

use Mix.Task

@shortdoc "Updates lockfiles from blend.exs"
@requirements ["app.config"]

@impl true
Expand Down

0 comments on commit 9194893

Please sign in to comment.