README.md
# Amber 🧡
[](https://hex.pm/packages/amber)
[](https://hexdocs.pm/amber/)
[](https://deno.com/)
✨🦕 [Deno](https://deno.com/) Bindings For [Gleam](https://gleam.run/) 🧡
## Installation
```sh
gleam add amber
```
Amber only supports the JavaScript target using the Deno runtime.
The following configuration should be used in your `gleam.toml`.
```toml
target = "javascript"
[javascript]
runtime = "deno"
```
## Usage
```gleam
import amber
import gossamer/text_encoder
pub fn main() {
let assert Ok(_) =
amber.write_file_sync("amber.txt", text_encoder.encode("deno bindings for gleam"))
}
```
Further documentation can be found at <https://hexdocs.pm/amber>.
## Contributing
### Prerequisites
- [Deno](https://docs.deno.com/runtime/getting_started/installation/)
- [Erlang](https://www.erlang.org/downloads)
- [Gleam](https://gleam.run/install/)
- [Just](https://just.systems/man/en/installation.html)
- [Lefthook](https://lefthook.dev/#how-to-install-lefthook)
- [Rebar3](https://rebar3.org/docs/getting-started/)
- [Watchexec](https://github.com/watchexec/watchexec#install)
_Tip_: These can also be installed via
[mise](https://mise.jdx.dev/getting-started.html) or
[asdf](https://asdf-vm.com/guide/getting-started.html), which read from
`.tool-versions`.
### Initial Setup
```sh
just
```
### Development
```sh
just watch build test
```