# `ComposerNew.Preflight`
[🔗](https://github.com/elixir-composer/composer/blob/v0.3.0/lib/composer_new/preflight.ex#L1)

The checks `mix composer.new` makes before it creates anything, and
reports all at once:

  * APP doesn't exist yet, unless `--reset` is given
  * the `igniter_new` archive is installed, at 0.5.32 or later: that is
    the first release that takes `--no-git` without also passing it to
    each `--install` package's installer
  * the `--with` task is available (`phx.new` needs the `phx_new`
    archive)
  * `git` is on the PATH

The lookups are functions in `checks`, so tests need no fakes on disk.

# `checks`

```elixir
@type checks() :: [
  exists?: (Path.t() -&gt; boolean()),
  task?: (String.t() -&gt; boolean()),
  igniter_new_version: (-&gt; String.t() | nil),
  executable?: (String.t() -&gt; boolean())
]
```

# `check`

```elixir
@spec check(ComposerNew.Plan.t(), checks()) ::
  {:ok, [String.t()]} | {:error, [String.t()]}
```

Checks `plan`. Returns `{:ok, warnings}` or `{:error, problems}`, each
a list of messages.

# `min_igniter_new`

```elixir
@spec min_igniter_new() :: String.t()
```

The minimum `igniter_new` version.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
