Esbuild (esbuild v0.1.1) View Source

Esbuild is a installer and runner for esbuild.

Contexts

You can define multiple esbuild contexts. By default, there is a context called :default which you can configure its args, current directory and environment:

config :esbuild,
  version: "0.12.15",
  default: [
    args: ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/assets),
    cd: Path.expand("../assets", __DIR__),
    env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
  ]

Link to this section Summary

Functions

Returns the path to the executable.

Returns the version of the esbuild executable.

Returns the configuration for the given context.

Returns the configured esbuild version.

Installs esbuild with configured_version/0.

Installs, if not available, and then runs esbuild.

Runs the given command with args.

Link to this section Functions

Returns the path to the executable.

The executable may not be available if it was not yet installed.

Returns the version of the esbuild executable.

Returns {:ok, version_string} on success or :error when the executable is not available.

Returns the configuration for the given context.

Returns nil if the context does not exist.

Returns the configured esbuild version.

Installs esbuild with configured_version/0.

Link to this function

install_and_run(context, args)

View Source

Installs, if not available, and then runs esbuild.

Returns the same as run/2.

Link to this function

run(context, extra_args)

View Source

Runs the given command with args.

The given args will be appended to the configured args. The task output will be streamed directly to stdio. It returns the status of the underlying call.