From fb69fdaebc4aad491121d9e779f7a43f34fdf41b Mon Sep 17 00:00:00 2001 From: Daniil Fedotov Date: Fri, 20 Jan 2017 18:13:04 +0000 Subject: [PATCH] Docs and README --- README.md | 23 +++++++++++++++-------- config/config.exs | 4 ++-- lib/mix/tasks/archive/build.all.ex | 1 - mix.exs | 14 ++++++++------ test/mix_task_deps_archive_test.exs | 5 ----- test/test_helper.exs | 1 - 6 files changed, 25 insertions(+), 23 deletions(-) delete mode 100644 test/mix_task_deps_archive_test.exs delete mode 100644 test/test_helper.exs diff --git a/README.md b/README.md index b211ae1..b41fb7f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,26 @@ -# MixTaskDepsArchive +# Mix tasks to archive project dependencies -**TODO: Add description** +This repo contains Mix tasks to create `*.ez` archives for a project dependencies. + +There are three new tasks: + +- `archive.build.deps` - build archives for a project dependencies +- `archive.build.elixir` - build archives with Elixir and Elixir apps (like `mix` or `logger`) +- `archive.build.all` - build dependencies archives and a project archive + +The tasks are intended to use to create no-dependency distributions of Elixir apps, +that can be run from Erlang runtime without installing Elixir and recompiling apps. ## Installation -If [available in Hex](https://hex.pm/docs/publish), the package can be installed -by adding `mix_task_deps_archive` to your list of dependencies in `mix.exs`: +The package can be installed by adding `mix_task_archive_deps` +to your list of dependencies in `mix.exs`: ```elixir def deps do - [{:mix_task_deps_archive, "~> 0.1.0"}] + [{:mix_task_archive_deps, "~> 0.1.0"}] end ``` -Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) -and published on [HexDocs](https://hexdocs.pm). Once published, the docs can -be found at [https://hexdocs.pm/mix_task_deps_archive](https://hexdocs.pm/mix_task_deps_archive). +The docs can be found at [https://hexdocs.pm/mix_task_archive_deps](https://hexdocs.pm/mix_task_archive_deps). diff --git a/config/config.exs b/config/config.exs index 9988be9..5f0cdd2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -10,11 +10,11 @@ use Mix.Config # You can configure for your application as: # -# config :mix_task_deps_archive, key: :value +# config :mix_task_archive_deps, key: :value # # And access this configuration in your application as: # -# Application.get_env(:mix_task_deps_archive, :key) +# Application.get_env(:mix_task_archive_deps, :key) # # Or configure a 3rd-party app: # diff --git a/lib/mix/tasks/archive/build.all.ex b/lib/mix/tasks/archive/build.all.ex index 47d159f..df315f8 100644 --- a/lib/mix/tasks/archive/build.all.ex +++ b/lib/mix/tasks/archive/build.all.ex @@ -17,7 +17,6 @@ ## ## - defmodule Mix.Tasks.Archive.Build.All do use Mix.Task diff --git a/mix.exs b/mix.exs index fa4cba3..c99d70d 100644 --- a/mix.exs +++ b/mix.exs @@ -17,18 +17,20 @@ ## ## -defmodule MixTaskDepsArchive.Mixfile do +defmodule MixTaskArchiveDeps.Mixfile do use Mix.Project def project do - [app: :mix_task_deps_archive, + [app: :mix_task_archive_deps, version: "0.1.0", elixir: "~> 1.4", build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, description: "Mix task to create archives for a project dependencies and elixit itslef", package: package(), - deps: deps()] + deps: deps(), + name: "MixTaskArchiveDeps", + source_url: "https://github.com/hairyhum/mix_task_archive_deps"] end # Configuration for the OTP application @@ -49,13 +51,13 @@ defmodule MixTaskDepsArchive.Mixfile do # # Type "mix help deps" for more examples and options defp deps do - [] + [{:ex_doc, "~> 0.14", only: :dev}] end defp package() do - [name: :mix_task_deps_archive, + [name: :mix_task_archive_deps, files: ["lib", "mix.exs", "README*", "LICENSE*"], maintainers: ["Daniil Fedotov"], licenses: ["Apache 2.0"], - links: %{"GitHub" => "https://github.com/hairyhum/mix_task_deps_archive"}] + links: %{"GitHub" => "https://github.com/hairyhum/mix_task_archive_deps"}] end end diff --git a/test/mix_task_deps_archive_test.exs b/test/mix_task_deps_archive_test.exs deleted file mode 100644 index 38d9b03..0000000 --- a/test/mix_task_deps_archive_test.exs +++ /dev/null @@ -1,5 +0,0 @@ -defmodule MixTaskDepsArchiveTest do - use ExUnit.Case - doctest MixTaskDepsArchive - -end diff --git a/test/test_helper.exs b/test/test_helper.exs deleted file mode 100644 index 869559e..0000000 --- a/test/test_helper.exs +++ /dev/null @@ -1 +0,0 @@ -ExUnit.start()