What is this?
gulpfile.js into your shopify theme root and run:
How to use this thing
- Go to you shopify admin panel > themes and click the preview icon for your current theme.
- Copy that entire preview url from the address bar
- Navigate to your project directory and run
gulp --url "https://your-shop.myshopify.com/?key=xxx"
- Chrome pops up showing your store through the localhost proxy
- Change files in your code editor, wait for gulp do it's thing (wait for the files to upload) and watch your browser(s) reload after everything's done
Side notes & Limitations
This is the product of an afternoon of hacking. By all means, if you find stuff that can be better: put down a pull request or PM me.
I also wanted to use browser sync's css injection feature which I couldn't figure out how to do currently because shopify stores assets on a cdn and the frontend loads those assets from that cdn url, which in turn leaves browser sync clueless of which resource to inject over.