urbit / create-landscape-app

Get started making a simple app for Landscape with a few commands.
86 stars 21 forks source link

Hot reloading on our ship #49

Closed dylanirlbeck closed 4 years ago

dylanirlbeck commented 4 years ago

Quick question for you all. I see that the create-landscape-app template files contain a copy of app.hoon (where app is just the name you've given the Gall app). When we make changes to this Hoon file, though, should we see the changes reflected in the corresponding Hoon file on our ship?

At the moment, this is not the behavior I'm seeing, so I'm wondering if I should instead just do JS dev in one directory and Hoon dev (for the backend) in my ship directory.

matildepark commented 4 years ago

You're correct; the hoon doesn't automatically update. You should do JS dev in one directory and Hoon dev in the ship's directory. Remember to |commit %home each time after you save.

(This |commit flow being slower and less conducive to the iterative process of JS development is why we use a separate dev server.)

When you're done, you can npm run build to make a production build of the JS and dump it into your ship's directory as well.