Esbuild (esbuild v0.2.0) View Source

Esbuild is a installer and runner for esbuild.

Profiles

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

config :esbuild,
  version: "0.12.17",
  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 profile.

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 profile.

Returns nil if the profile does not exist.

Returns the configured esbuild version.

Installs esbuild with configured_version/0.

Link to this function

install_and_run(profile, args)

View Source

Installs, if not available, and then runs esbuild.

Returns the same as run/2.

Link to this function

run(profile, 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.