wilr / grunt-shopify

Grunt plug-in for publishing Shopify theme assets
BSD 3-Clause "New" or "Revised" License
107 stars 32 forks source link

Livereload is trigger prematurely #42

Closed jbarlow83 closed 7 years ago

jbarlow83 commented 10 years ago

When grunt-shopify is set up as a watched task with livereload enabled it will do the following:

It appears that it is sending some sort of premature completion signal back to grunt-contrib-watch instead of signalling completion when the file is actually done uploading.

Here's the relevant part of Gruntfile.coffee.

shopify:
  options:
    base: "deploy/"
watch:
  configFiles:
    files: ["Gruntfile.coffee"]
    options:
      reload: true
  shopify:
    files: ["deploy/**"]
    tasks: ["shopify"]
    options:
      livereload: true

justinmetros commented 10 years ago

+1 for this :)

If the livereload can happen on the ( potentially inaccurate ) upload success callback, I will personally send you a bottle of the finest sour mash bourbon whiskey.

As we work with Shopify, and grunt-shopify daily, this would be huge! In all honestly, grunt-shopify is the one piece of our workflow that inhibits us moving to gulp.

Radiator is also trying to help repay the community be releasing some of our tools in early '15. Standing on the shoulders of giants, but theres some bits and pieces we cant wait to open source.

ehrig commented 9 years ago

Same issue here. Would love to be able to use livereload. @wilr what can we do?

wilr commented 9 years ago

PR welcome for live reload if anyone wants to work on it. I don't particularly have a need for it and happy to do it manually but unless someone wants to work on it, I'll tackle it in my next down time. I think the consensus is to also move watch libraries so I'll tackle both at the same time. If anyone wants to start, let me know.

wilr commented 7 years ago

Closing this as it works fine with browserSync without any core changes, looks like livereload /grunt has a bunch of discussion on how to resolve this but nothing got decided on from my look? https://github.com/gruntjs/grunt-contrib-watch/issues/156, https://github.com/gruntjs/grunt-contrib-watch/issues/165