Open joshwnj opened 9 years ago
http://www.browsersync.io/ for css-reloading. How do you envision css-modulesify handling the task?
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).
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 :\
cool! well if you have time to put up a demo somewhere I'd love to see
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
Any updates on this?
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
.
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)