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
aexmachina opened this Issue Oct 23, 2014 · 17 comments

Comments

Projects
None yet
8 participants
@aexmachina
Contributor

aexmachina 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

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Oct 23, 2014

Contributor

@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

Contributor

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

@aexmachina

This comment has been minimized.

Show comment
Hide comment
@aexmachina

aexmachina Oct 23, 2014

Contributor

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

Contributor

aexmachina commented Oct 23, 2014

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

@rwjblue

This comment has been minimized.

Show comment
Hide comment
@rwjblue

rwjblue Nov 8, 2014

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Nov 18, 2014

Contributor

@aexmachina status?

Contributor

stefanpenner commented Nov 18, 2014

@aexmachina status?

@aexmachina

This comment has been minimized.

Show comment
Hide comment
@aexmachina

aexmachina Nov 19, 2014

Contributor

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

Contributor

aexmachina commented Nov 19, 2014

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

@aexmachina

This comment has been minimized.

Show comment
Hide comment
@aexmachina

aexmachina Dec 10, 2014

Contributor

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

Contributor

aexmachina commented Dec 10, 2014

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

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Dec 10, 2014

Contributor

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

Contributor

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.

@aexmachina

This comment has been minimized.

Show comment
Hide comment
@aexmachina

aexmachina Dec 10, 2014

Contributor

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

Contributor

aexmachina commented Dec 10, 2014

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

@seawatts

This comment has been minimized.

Show comment
Hide comment
@seawatts

seawatts Dec 19, 2014

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

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

@AlexandreBroudin

This comment has been minimized.

Show comment
Hide comment

👍 too

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Dec 19, 2014

Contributor

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

Contributor

stefanpenner commented Dec 19, 2014

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

@pixelhandler

This comment has been minimized.

Show comment
Hide comment
@pixelhandler

pixelhandler Jan 30, 2015

Contributor

This would be great 👍

Contributor

pixelhandler commented Jan 30, 2015

This would be great 👍

@stefanpenner stefanpenner added this to the v1.0.0 milestone Feb 24, 2015

@rwwagner90

This comment has been minimized.

Show comment
Hide comment
@rwwagner90

rwwagner90 Apr 9, 2015

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Apr 9, 2015

Contributor

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.

Contributor

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.

@aexmachina

This comment has been minimized.

Show comment
Hide comment
@aexmachina

aexmachina Apr 12, 2015

Contributor

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

Contributor

aexmachina commented Apr 12, 2015

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

@oligriffiths

This comment has been minimized.

Show comment
Hide comment
@oligriffiths

oligriffiths Nov 29, 2015

Contributor

@stefanpenner What's the progress on this?

Contributor

oligriffiths commented Nov 29, 2015

@stefanpenner What's the progress on this?

@rwjblue

This comment has been minimized.

Show comment
Hide comment
@rwjblue

rwjblue Nov 29, 2015

Contributor

@oligriffiths - This is being replaced by #5165.

Contributor

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

Auto merge of #5165 - gcollazo:hot-reload-styles, r=rwjblue
[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