A HyperScript clone written in Elixir
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.formatter.exs
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
mix.exs

README.md

HyperEx

Hex.pm Hex.pm Travis

A HyperScript clone written in Elixir.

HyperScript is a JavaScript library to render html with a functional API. HyperScript exposes one main function, h.

Here's what that looks like in HyperEx:

HyperEx.h("div#foo.bar", "Hello world!")
~s{<div id="foo" class="bar">Hello world!</div>}

HyperEx.h("div#foo.bar", [class: "baz"], "Hello world!")
~s{<div class="bar baz" id="foo">Hello world!</div>}

Besides h, HyperEx exposes a few more helper functions: open, close and wrap. Read the API reference for a detailed overview.

Installation

Add hyper_ex to your list of dependencies in mix.exs:

def deps do
  [{:hyper_ex, "~> 0.1.0"}]
end

Usage

See https://hexdocs.pm/hyper_ex/

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ mix test

Contributing

Pull requests are welcome!

Credits

License

The MIT License (MIT). Please check the LICENSE for more information.