Skip to content

esbuild prebuild binaries packaged as an opam package

License

Notifications You must be signed in to change notification settings

tmattio/opam-esbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opam-esbuild

esbuild is a JavaScript and CSS bundler and minifier.

This opam package wraps the standalone executable version of the esbuild project. These executables are platform specific. Upon installation, opam will automatically pick the correct executable for your platform and install it as a esbuild binary. Supported platforms are Linux arm64, Linux x64, macOS arm64, macOS x64, and Windows x64.

Once installed, you can execute the binary with:

opam exec -- esbuild

Here is a dune rule that uses the installed binary to bundle a JavaScript file:

(rule
 (targets main.js)
 (deps
  (:input main.bc.js))
 (action
  (chdir
   %{workspace_root}
   (run
    esbuild
    --platform=browser
    --external:fs
    --external:tty
    --external:child_process
    --external:constants
    --minify
    --bundle
    --outfile=%{targets}
    %{input}))))

Installation

You can install opam-esbuild using opam:

opam install esbuild

License

opam-esbuild is released under the ISC License. Esbuild is released under the MIT License.

About

esbuild prebuild binaries packaged as an opam package

Resources

License

Stars

Watchers

Forks

Packages

No packages published