# `mix erabi.build`
[🔗](https://github.com/hattoriai/erabi/blob/v0.1.0/lib/mix/tasks/erabi.build.ex#L1)

Builds the Erabi pickers into `priv/static`.

    $ mix erabi.build

This task is for work on Erabi itself. An application that uses Erabi
gets the built files in the Hex package and does not run this task: in
any project but Erabi, the task stops with an error before it changes
a file.

The task:

  1. Runs `npm ci` in `assets/` when `assets/node_modules` is missing or
     `assets/package-lock.json` changed since the last install.
  2. Empties `priv/static`, so that it holds only the files of this
     build.
  3. Runs esbuild (the `esbuild` Mix package) with the `:erabi_esm` and
     `:erabi_cjs` profiles, and those of the entries of the color picker
     (`erabi/color`) and the emoji pickers (`erabi/emoji`).
  4. Copies `assets/css/erabi.css` and `assets/css/erabi-sumi.css` to
     `priv/static/`.

After the task, `priv/static` holds exactly these eight files, which are
the files of the Hex package.

It needs `npm` on the path and the `:esbuild` dependency, which is
available in the `:dev` environment.

---

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