Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Hot loading #30

Open
joshwnj opened this issue Aug 20, 2015 · 7 comments
Open

Hot loading #30

joshwnj opened this issue Aug 20, 2015 · 7 comments
Milestone

Comments

@joshwnj
Copy link
Member

joshwnj commented Aug 20, 2015

As someone once wisely said to me, "if you ain't hot-loading, you ain't coding".

Let's make it happen. I'd like to collect some workflow examples and if there are any changes required, bundle them in as part of the 1.0 release (#29)

@joeybaker
Copy link
Contributor

http://www.browsersync.io/ for css-reloading. How do you envision css-modulesify handling the task?

@joshwnj
Copy link
Member Author

joshwnj commented Aug 20, 2015

Will take a look at browsersync, thanks. In this case we need to consider a few more edge cases than normal, since an edit to a css module may also need to trigger a rebuild / reload of a js module (if the export tokens changed).

@joeybaker
Copy link
Contributor

yea, I have a setup where this is done with https://github.com/mattdesl/budo/ + browsersync, I'd like to get it open sourced, but again… I won't have time for a few weeks :\

@joshwnj
Copy link
Member Author

joshwnj commented Aug 20, 2015

cool! well if you have time to put up a demo somewhere I'd love to see

@joeybaker
Copy link
Contributor

This is somewhat custom to what we're doing, but it should give you an idea of how we setup budo + browsersync for a universal hot-reloading script: https://gist.github.com/joeybaker/b7324e8519952b9de76a

@joshwnj joshwnj added this to the 1.0 release milestone Aug 31, 2015
@neurosnap
Copy link

Any updates on this?

@joshwnj
Copy link
Member Author

joshwnj commented Apr 29, 2016

There are a few things that need to change in order to get css-modulesify working with browserify-hmr. Rather than hacking too much on this one I've been experimenting with a rewrite: https://github.com/joshwnj/cmify

You can also take a look at a basic example of hot reloading here: https://github.com/joshwnj/css-modules-starter-kit/tree/hot-reload

There are a few more things I need to look into first but there's a possibility that we'll be able to bring across these improvements to a major-version update of css-modulesify.

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

No branches or pull requests

3 participants