Skip to content

Commit

Permalink
Add package.json installation instructions and relax version in Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tmepple committed Oct 27, 2019
1 parent 5bc015e commit 0877d82
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,30 @@ Add to your `mix.exs` and run `mix deps.get`:
```elixir
def deps do
[
{:phoenix_live_react, "~> 0.2.0"}
{:phoenix_live_react, "~> 0.2"}
]
end
```

Then add to your `assets/package.json` and run `npm i` or `yarn`:

```
{
...
"dependencies": {
...
"phoenix": "file:../deps/phoenix",
"phoenix_html": "file:../deps/phoenix_html",
"phoenix_live_view": "file:../deps/phoenix_live_view",
"phoenix_live_react": "file:../deps/phoenix_live_react", <-- ADD THIS!
...
},
...
}
```

Note for umbrella projects the relative file paths should look like `"file:../../../deps/phoenix_live_react"`

## Usage

Add your react components to the window scope (`app.js`):
Expand Down

0 comments on commit 0877d82

Please sign in to comment.