Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

livereload #1

Closed
yoshuawuyts opened this issue Dec 24, 2015 · 12 comments
Closed

livereload #1

yoshuawuyts opened this issue Dec 24, 2015 · 12 comments
Assignees

Comments

@yoshuawuyts
Copy link
Member

Hooks are already in place in html, should probably add to sheetify hooks to send a msg when updated

@bcomnes
Copy link
Collaborator

bcomnes commented Aug 24, 2016

Whats involved in getting this in?

@yoshuawuyts
Copy link
Member Author

Hmm, goooood questiooooon. I believe we're already injecting the script into the html so what we'd need to do then is trigger the script each time CSS is updated. Something like that hmm

The fancier stuff would then be to also add hot reloading but that's just an extra plugin on top of this hmm

@bcomnes
Copy link
Collaborator

bcomnes commented Aug 24, 2016

I didn't see the live reload script last night when I tried the example. (#69 for some minor changes to that).

I could be trippin

@yoshuawuyts
Copy link
Member Author

Oh odd, seems it was removed in the latest patch. Ah well, could easily be restored C: https://github.com/yoshuawuyts/bankai/blob/0077f522b5d3ba0a1060c725c833f098e3749fbc/handler-html.js#L1

@marionebl
Copy link
Contributor

Actually the livereload script was never included. Is this worthwile given hmr could be implemented instead?

@yoshuawuyts
Copy link
Member Author

yeah guess we could add hmr for css at low cost too so that seems like the better way to go for sure

@bcomnes
Copy link
Collaborator

bcomnes commented Sep 16, 2016

I would rather see live reload if it means seeing it sooner than an HMR solution. I've not had great experiences with HMR in the past. It requires that you modify code to work with it right?

@yoshuawuyts
Copy link
Member Author

@bcomnes nah in this case we would go for the naive option - save the state object globally; reload the <script> tag with the new script and reattach the state. Using SSE / WS it should be fairly straight forward. But as you say it could indeed lead to edge cases when modifying models so yeahhh. Overall I think it's useful in some cases for sure

@timwis
Copy link
Member

timwis commented Oct 5, 2016

What about people who want to use bankai for projects that don't have global state the same way choo/redux style apps do? Just browserify built apps. They'd probably need live reload.

@marionebl
Copy link
Contributor

Boils down to: What is this? A beefy/budo clone or something more specialized?

My view of bankai

  • tailored to "idiomatic" choo
  • batteries (hmr, css-in-js, index html, build) included
  • zero config
  • use budo if you need more flexibility

@yoshuawuyts
Copy link
Member Author

I think you're both right. The way I view bankai is probably somewhere in the middle:

  • library to hook into a streaming HTTP server to serve frontend bundles
  • CLI with sensible defaults for developing single state application (e.g. choo)
  • CLI with sensible defaults for creating production ready static files
  • flexible enough to be used with other frontend frameworks by toggling flags

Does that make sense?

@yoshuawuyts
Copy link
Member Author

closing in favor of #31

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants