tmslnz / gulp-shopify-theme

Shopify theme synchronisation during development
Apache License 2.0
24 stars 6 forks source link

Renaming file #8

Open YewTreeWeb opened 6 years ago

YewTreeWeb commented 6 years ago

Hi,

Firstly, great plugin! Thanks for creating this. I was wondering in Slate 2 if you rename a file the rename will take effect on the Shopify store. Is there a feature for that in this plugin? If not can it be marked as a feature request?

Thanks for taking the time to read my feature request.

tmslnz commented 6 years ago

It’s technically possible, but a hairy mess to do well and the benefits seem thin to me at least.

The purpose of this package is to be able to quickly iterate over changes during development. Deletes and renames are essentially the same thing, and would require keeping track of a lot more things.

For example: What if you purge the build directory only to have rebuilt a second later? Should we delete all files on Shopify as well then reupload everything?

How do we keep track of state between sessions? Do we download the full list of assets, compare it with local and delete anything that isn’t there?

To me the answer to all these is to use theme.purge() and then re-sync once you are done.

I feel it is not an issue to have old stray files in the uploaded theme if re syncing it is a simple purge & reupload operation.

Happy to hear suggestions or other opinions.