https://github.com/harmon25/surface_lib
demo surface lib with sample hooks
https://github.com/harmon25/surface_lib
Last synced: 28 days ago
JSON representation
demo surface lib with sample hooks
- Host: GitHub
- URL: https://github.com/harmon25/surface_lib
- Owner: harmon25
- Created: 2021-03-03T22:54:02.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T23:30:01.000Z (over 5 years ago)
- Last Synced: 2025-12-28T15:00:33.748Z (6 months ago)
- Language: Elixir
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SurfaceLib
Example of a surface library that includes bundled hooks.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `surface_lib` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:surface_lib, "~> 0.1.0"}
]
end
```
In your package.json add `surface_lib` as a dependency.
```json
{
"surface_lib": "file:../deps/surface_lib"
}
```
Merge supplied hooks with your hooks.
```js
import surfaceLibHooks from "surface_lib"
import myHooks from "./_hooks"
const hooks = {...surfaceLibHooks, ...myHooks}
// pass hooks into liveview initalization
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/surface_lib](https://hexdocs.pm/surface_lib).