Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
./script/develop.sh
to use elm-live with hot reload.You might need to drop the local
.direnv
directory if elm-live is not available, I'm not sure how to force the nix-profile to be rebuilt in other way.In case you are blocked the old script is in
./script/legacy-develop.sh
, we can clean things later and probably drop python as a dependency.In order to make hot reload work the Example/UsageExample needs to be tweaked a bit. Before this PR we stored them fully in the App model. This included the view, so the hot reload making its magic restored the old views 🙃 . We now store only the example state in the App model. Additionally examples now define
init
instead ofstate
field and theview
functions receive the state explicitly. Example and UsageExample are now immutable declarations.🍐 with @tesk9