How to setup a local shopify theme development environment

Ilias Haddad - Shopify Developer | Full Stack Developer | Freelancer

December 08, 2020 - 1 min read

In the seventh article, As requested, I'll be talking about how to set up a local shopify theme development environment.

Let's go!

To create unlimited Shopify stores for development, you can create a Shopify Partner account using this link

Install ThemeKit

ThemeKit is the Offical Shopify tool to work with Shopify themes locally

macOS Installation

brew tap shopify/shopify

brew install themekit

Windows Chocolatey Installation

choco install themekit

Linux Installation

curl -s [<https://shopify.github.io/themekit/scripts/install.py>](<https://shopify.github.io/themekit/scripts/install.py>) | sudo python

Create Private Shopify App

  • Go Admin > Apps and click on manage private apps at the bottom of the page  How to setup a local shopify theme development environment)

  • Click on Enable Private App Development and enable it  How to setup a local shopify theme development environment)

  • Create a new private app and select Themes with reading and write permissions  How to setup a local shopify theme development environment)

  • Copy the Password

Configure ThemeKit

Create a directory for this theme

Run this command to download your theme code

theme get -p=your-password -s=[you-store.myshopify.com](<http://you-store.myshopify.com/>) -t=your-theme-id

 How to setup a local shopify theme development environment)

and run this command to watch for file changes and upload them automatically to your remote Shopify theme

theme watch

It's recommend to have config file, to prevent from overwiring the config/settings_data.json file that have the Shopify theme data like Shopify sections content or have different environement

development:
  password: Password
  theme_id: theme_id
  store: example.myshopify.com
  ignore_files:
    - config/settings_data.json
production:
  password: Password
  theme_id: theme_id
  store: example.myshopify.com
test:
  password: Password
  theme_id: theme_id
  store: example.myshopify.com

References:

Shopify ThemeKit Docs

Subscribe below to get notified of new posts.
Your comment
Let's Build Something Together

Feel free to reach out if you're looking for a developer, have a question, or just want to connect.

© Ilias Haddad 2020. All rights reserved.

Made with ❤️ in Morocco 🇲🇦