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

Configure other options to livereload #186

Closed
thiago opened this issue Jul 3, 2015 · 2 comments
Closed

Configure other options to livereload #186

thiago opened this issue Jul 3, 2015 · 2 comments

Comments

@thiago
Copy link

thiago commented Jul 3, 2015

Hello,
I need specify a new src to livereload script loaded from my page to use a proxy.

Reading the livereload documentation I see that is possible, but from grunt-contrib-connect options It's not possible.

My sugestion is change the conditions to receive complete livereload options too if it is passed.

Example:

connect: {
   options: {
      port: 8080,
      hostname: 'localhost',
      livereload: {
         port: 35729,
         src: '/livereload/livereload.js'
      }
   }
...

ps: Sorry my english is very bad!

@jamey-taylor
Copy link

Agreed. grunt-contrib-connect handles the libreload attribute different than libreload.js. grunt-contrib-connect always expects a number. But it should accept either a number or an object.

To get libreload working on https on an alternate port, I patched my local copy near TODO comment at line 135 of /tasks/connect.js with

      var port = (typeof options.livereload === 'object' && options.livereload.port) ? options.livereload.port : livereload;
          middleware.unshift(injectLiveReload({port: port }));

@XhmikosR
Copy link
Member

XhmikosR commented Sep 9, 2018

Duplicate of #100.

@XhmikosR XhmikosR closed this as completed Sep 9, 2018
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