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

Add ability to reload CSS without reloading the whole page #2371

Closed
simonexmachina opened this issue Oct 23, 2014 · 17 comments
Closed

Add ability to reload CSS without reloading the whole page #2371

simonexmachina opened this issue Oct 23, 2014 · 17 comments
Assignees

Comments

@simonexmachina
Copy link
Contributor

@simonexmachina simonexmachina commented Oct 23, 2014

I've submitted a PR to broccoli-sane-watcher that will provide the set of changed files in the change event. We can inspect this and tell LiveReload to only reload the CSS if only CSS files have changed.

I'm happy to do this, but the question is how to handle CSS preprocessors. For example if I use SASS then I need to check for changes to \.(scss|sass)$, but if I'm using LESS then I need to check for \.less$. Obviously we can just provide a list of file extensions that covers the current CSS preprocessors, but it would be better to be able to get this information from the Registry.

I can get this information from the Registry (I'd need to capture it in the StylePlugin but that's fine), but what I can't see is how I can get ahold of the registry from the livereload-server.js.

Any suggestions?

@stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented Oct 23, 2014

@aexmachina it seems like we will just need to pass the registry around so that you have access to it where you need it:)

this seems awesome

@simonexmachina
Copy link
Contributor Author

@simonexmachina simonexmachina commented Oct 23, 2014

Haha, LOL. Yes if you wouldn't mind...

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Nov 8, 2014

@stefanpenner asked that I look into this. I took a crack at knowing when a given output file changes in #2465. I think this might be the best/easiest way to get what you want. I didn't have time to add tests, but the implementation there triggers livereload with the specific output files that have changed.

@stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented Nov 18, 2014

@aexmachina status?

@simonexmachina
Copy link
Contributor Author

@simonexmachina simonexmachina commented Nov 19, 2014

Yep, all done but currently blocked by an issue in #2465 that's blocking my PR #2473 from being merged.

@simonexmachina
Copy link
Contributor Author

@simonexmachina simonexmachina commented Dec 10, 2014

@stefanpenner did you get a chance to look at the failing tests?

@stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented Dec 10, 2014

unfortunately not yet, hoping to improve the performance of the test suite first, so the slow tests are bearable to debug.

@simonexmachina
Copy link
Contributor Author

@simonexmachina simonexmachina commented Dec 10, 2014

Okay, no worries. I'm not doing much SASS any more anyway :)

@seawatts
Copy link

@seawatts seawatts commented Dec 19, 2014

+1 for getting this working =) Anything I can do to help? I'm using sass and compass to preprocess

@AlexandreBroudin
Copy link

@AlexandreBroudin AlexandreBroudin commented Dec 19, 2014

👍 too

@stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented Dec 19, 2014

If you have time, attempting to debug @rwjblue failing tests is likely a good place to start

@pixelhandler
Copy link
Contributor

@pixelhandler pixelhandler commented Jan 30, 2015

This would be great 👍

@stefanpenner stefanpenner added this to the v1.0.0 milestone Feb 24, 2015
@rwwagner90
Copy link
Contributor

@rwwagner90 rwwagner90 commented Apr 9, 2015

What's the status on this? I can try to help out, but not sure how much help I would be.

@stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented Apr 9, 2015

What's the status on this? I can try to help out, but not sure how much help I would be.

we are re-working the internal build system to better provide selective builds. Once that lands we will likely dig in. If someone wants to make this work before, they are welcome to submit. If the PR is reasonable we will accept it.

@simonexmachina
Copy link
Contributor Author

@simonexmachina simonexmachina commented Apr 12, 2015

I have been using ember-cli-styles-reloader as an interim solution and it appears to work well.

@oligriffiths
Copy link
Contributor

@oligriffiths oligriffiths commented Nov 29, 2015

@stefanpenner What's the progress on this?

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Nov 29, 2015

@oligriffiths - This is being replaced by #5165.

@rwjblue rwjblue closed this Nov 29, 2015
homu added a commit that referenced this issue Dec 3, 2015
[ENHANCEMENT] Initial implementation of css hot realod

[Link to original PR](#5162)

Replaces #2371.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants