Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebastiandedeyne/hyper_ex
A HyperScript clone written in Elixir
https://github.com/sebastiandedeyne/hyper_ex
Last synced: 28 days ago
JSON representation
A HyperScript clone written in Elixir
- Host: GitHub
- URL: https://github.com/sebastiandedeyne/hyper_ex
- Owner: sebastiandedeyne
- License: mit
- Created: 2017-10-04T10:33:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-03T09:21:10.000Z (about 7 years ago)
- Last Synced: 2024-04-25T18:43:01.973Z (7 months ago)
- Language: Elixir
- Homepage: https://hex.pm/packages/hyper_ex
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HyperEx
[![Hex.pm](https://img.shields.io/hexpm/v/hyper_ex.svg)](https://hex.pm/packages/hyper_ex)
[![Hex.pm](https://img.shields.io/hexpm/dt/hyper_ex.svg)](https://hex.pm/packages/hyper_ex)
[![Travis](https://img.shields.io/travis/sebastiandedeyne/hyper_ex.svg)](https://travis-ci.org/sebastiandedeyne/hyper_ex)A [HyperScript](https://github.com/hyperhype/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:
```elixir
}
HyperEx.h("div#foo.bar", "Hello world!")
~s{HyperEx.h("div#foo.bar", [class: "baz"], "Hello world!")
}
~s{
```Besides `h`, HyperEx exposes a few more helper functions: `open`, `close` and `wrap`. Read the [API reference](https://hexdocs.pm/hyper_ex/HyperEx.html) for a detailed overview.
## Installation
Add `hyper_ex` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:hyper_ex, "~> 0.1.0"}]
end
```## Usage
See [https://hexdocs.pm/hyper_ex/](https://hexdocs.pm/hyper_ex/)
## Changelog
Please see [CHANGELOG](https://github.com/sebastiandedeyne/hyper_ex/blob/master/CHANGELOG.md) for more information what has changed recently.
## Testing
```bash
$ mix test
```## Contributing
Pull requests are welcome!
## Credits
- [Sebastian De Deyne](https://github.com/sebastiandedeyne)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please check the [LICENSE](https://github.com/sebastiandedeyne/hyper_ex/blob/master/LICENSE.md) for more information.