BrowserSync / gulp-browser-sync

How to use the Browsersync module with gulp.
http://browsersync.io
384 stars 27 forks source link

Refresh local css on remote server? #43

Open christianmagill opened 9 years ago

christianmagill commented 9 years ago

I do a lot of WordPress development and due to the workflow at my work the site needs to be loaded on a remote server for marketing to do their thing.

I'd love to use something like BrowserSync and what I am wondering, is there any way to inject the local css into the remote website and have it reload on changes. I could create a development user and link to the local css when they are logged in.

This situation was mentioned in https://github.com/BrowserSync/grunt-browser-sync/issues/28, however the particular user case was solved via delay. I'm wondering about linking directly to local files or swapping the urls to point to local files as LiveReload is capable of.

Thanks,

wtser commented 9 years ago

I have the same question

TomOne commented 8 years ago

I was able to find a solution for this:

Given the recipe for Gulp + Sass, replace this line with the following snippet:

proxy: 'desired-remote-host.com',
serveStatic: ['.'],

Also make sure the path for the CSS file one the server matches your local file.