wilr / grunt-shopify

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

Provide warning when plugin attempts to sync a folder that is not whitelisted #15

Closed wilr closed 10 years ago

wilr commented 11 years ago

Followed on from #6, Shopify defines allowed base folders (snippets, assets etc) and throws a 404 if the folder does not match. If we sync an incorrect path throw a warning.

pagameba commented 10 years ago

I set up my watch config like this to (partially) avoid this problem:

  watch: {
    shopify: {
      files: ['theme/assets/**','theme/config/**','theme/layout/**','theme/snippets/**','theme/templates/**']
    }
  }

Baking a whitelist into grunt-shopify would be great. It would also be nice to have some kind of ignore pattern too - for instance when I create a new file in my text editor it creates a file on disk called untitled.txt which gets immediately uploaded by the watch task and then gets renamed, which also gets uploaded. The theme gets a bit littered with cruft which can be fixed but its a bit annoying.

wilr commented 10 years ago

Resolved by addition of isWhitelistedPath.