shopifyliquid

How to test shopify themes locally?


I was wondering what the best way was to deploy shopify themes locally for testing before deploying. We recently started employing deploybot. We really like deploybot but we also would like a way to not wait five minutes to test our files in an alternate store.

How would I accomplish this?


Solution

  • For anyone coming to this in 2018, we now have use of Slate.

    https://shopify.github.io/slate/

    For an idea of workflow, we have multiple devs working on the same theme and they can see their changes locally with Slate.

    How we achieve this

    EDIT - For creating new section files, template files, product templates etc

    You won't be able to create these files and for them to be displayed locally without a small workaround.

    For example, if you create a new product template ("product.my-product.liquid"), you'll need to Publish your preview theme first, then perform a "slate start" in terminal, select your new product template for whatever product you're using it on in Shopify, then re-publish your "master" theme.

    You may need to do another "slate start" to get the new theme template displaying on the product locally, but it will work.

    This is because Shopify only allows you to assign product templates to the current active theme.