# `NPM.Install.Hooks`
[🔗](https://github.com/elixir-volt/npm_ex/blob/v0.7.4/lib/npm/install/hooks.ex#L1)

Hooks for integrating npm operations with Mix workflows.

Provides callbacks that can be triggered before and after
npm operations, useful for mix compiler integration and
build pipelines.

# `hook`

```elixir
@type hook() :: :pre_install | :post_install | :pre_resolve | :post_resolve
```

# `available`

```elixir
@spec available() :: [hook()]
```

Available hook points.

# `configured`

```elixir
@spec configured() :: %{required(hook()) =&gt; term()}
```

List all configured hooks.

# `configured?`

```elixir
@spec configured?(hook()) :: boolean()
```

Check if a hook is configured.

# `run`

```elixir
@spec run(
  hook(),
  keyword()
) :: :ok
```

Run a hook callback if configured.

Hooks are configured via application config:

    config :npm, hooks: %{
      post_install: {MyApp, :on_npm_install, []}
    }

---

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