Giter Site home page Giter Site logo

Comments (10)

wilr avatar wilr commented on August 13, 2024

Is there any other watchers or grunt files running? At the watcher stage there shouldn't be anything involved with the plugin (i.e grunt-contrib-watch is being on the app folder so should never touch the src folder) from that setup

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

It's the only watch and Gruntfile running. But if you look at the terminal screenshot, you can see that the first upload is from the src folder and the second is from the app folder. Everything runs smoothly if I remove the grunt-contrib-copy from the Gruntfile.

from grunt-shopify.

farneman avatar farneman commented on August 13, 2024

I'm seeing the same issue as well. I'm working out of a shop folder and then using ryanburnette/grunt-shopify-theme to copy over the necessary files to a dist folder. According to my terminal output grunt-shopify uploads the changed file from shop first then after grunt-shopify-theme runs grunt-shopify again uploads the changed file from dist.

from grunt-shopify.

farneman avatar farneman commented on August 13, 2024

Since grunt-shopify-theme also uses grunt-contrib-copy I tested disabling that task and when I did only one upload happened on change. So maybe some sort of conflict with grunt-contrib-copy triggers the first erroneous upload?

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

@farneman exactly! grunt-shopify trigger before other tasks defined in watch.

from grunt-shopify.

justinmetros avatar justinmetros commented on August 13, 2024

Same issue here. Overall it works well and files get uploaded, just 5% weird that its trying to upload initially on a file save from a directory not specified in the files array, seemingly out of turn. Don't have a solution and this won't stop my enjoyment of the plugin, but any insight would be much appreciated :) All plays well when not combined with another task that uses watch, in this case grunt-contrib-sass. Here's a screengrab and my watch for good measure:

grunt-shopify

watch: {
        css: {
          files: ['_sass/**/*.scss'],
          tasks: ['sass','cssc'],
          options: {
            spawn: false,
          }
        },
        shopify: {
          files: ['theme/assets/**','theme/config/**','theme/layout/**','theme/snippets/**','theme/templates/**'],
          tasks: ["shopify"]
        }
      }

Edit: https://github.com/erickreutz/grunt-shopify this version fixes the multiple upload issue for me. Sorry if I jumped the gun, new to this plugin. Thanks so much all for the great work. Cheers!

from grunt-shopify.

ctalkington avatar ctalkington commented on August 13, 2024

I believe the issue is that the watch event doesn't respect which target. now v0.5 of watch does include the target as an arg so we may be use that but my latest changes should also prevent from uploading anything not in base path (which is cwd if not using a base)

from grunt-shopify.

graygilmore avatar graygilmore commented on August 13, 2024

I think this is the commit that fixes it: erickreutz@39c29e8?w=1

I'm getting a similar bug.

It's great that it's letting me know that that file isn't allowed, but it shouldn't really be checking outside of the folders I declare for it to watch anyways.

watch:
    styles:
        files: ["styles/*"]
        tasks: ["concat"]
    shopify:
        files: ["assets/*","config/*","layout/*","snippets/*","templates/*"]
        tasks: ["shopify"]

from grunt-shopify.

cshold avatar cshold commented on August 13, 2024

Agreed with Gray above. No need to watch/notify me of files outside those declared in files.

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

Should now be resolved.

from grunt-shopify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.