Install Themekit and Shopify theme for local development in Windows

June 14, 2023 |
Views 881

technology

Theme Kit is a cross-platform command line tool that can be used to build Shopify themes in local for windows. Before installing themekit one should install chocolatey. If not already installed please check this post: read more

Follow the steps below to install themekit:

  1. Open windows PowerShell > right click > run as administrator

Running it as administrator is very important.

  1. run the code below:choco install themekit

PS C:\windows\system32> choco install themekit
[in my case the path is C:/windows/system32]

It will prompt to type in Yes or No . Type Y and press enter

  1. On successful installtion will show:

"themekit v1.3.1 [Approved]"

" The install of themekit was successful.Software install location not explicitly set, it could be in package or default install location of installer."

  1. Test whether the installation was successful by running theme in cmd.exe

theme

PS C:\windows\system32> theme

 

[Note: the actual path to themekitĀ  installation: C:ProgramData\chocolatey\lib\themekit\tools\theme.exe]

 

INSTALLING SHOPIFY IN LOCAL FOR THEME DEVELOPMENT OR MODIFICATION [Windows]:

Requirement:
- Chocolatey and Themekit
- VSCode editor
- Need to Join Shopify Partners and set up an account. https://www.shopify.com/in/partners

1. To start with - Add a store: create as development store - create a store to test and build. Add a name to your store. Start with empty store and click the create development store button. Now your online store is created with an generated URL. Note your URL.

  1. Generate password: install the app themekit access. https://apps.shopify.com/theme-kit-access

Generated password will be emailed to you and is valid for 7 days.
Note your password.

  1. Navigate to online stores > themes > dawn (default) current theme > click on the three dots > edit code

In the screen that displays - the 12digit no. at the end of the url is your Theme ID. Note your theme ID

  1. To Download the Shopify Theme for Local Development [in this case its the dawn theme]

First create a folder in your local. Open VSCode, open the newly created folder from your editor. Open a new terminal and run the code:

theme get --password=[your-password] --store="[your-store.myshopify.com]" --themeid=[your-theme-id]

your password [step 2], your store name[step1] dont miss the double quotes, your theme id [step3]

All the files will download and you are set to go!

Note: config.yml contains storename + password + theme_id

 

  1. Creating a new Shopify Theme for Local Development , run the code below:

theme new --password=[your-password] --store="[your-store.myshopify.com]" --name=[theme name]

theme name = set a name for your theme it can be anything.

Go to Online stores > themes > scroll down a bit to find your new theme > click Publish button next to it. Your new theme will replace the Dawn theme.

 

  1. To Push updates to your theme.
    navigate to your folder > layout > theme.liquid.Make any changes there. Like you can add "Hello World" inside <body> tag.

In a new terminal window, run the code:

theme watch

theme watch -- allow-liveĀ  [run this code if the above shows an error]

save the changes you made in theme.liquid

  1. Go to Online store > themes > theme_name > click on the three dots > preview

The new changes will now reflect in your page.

or

online store > themes > view your store

 

 

Related Articles

Related

Themes or Templates collection

Explore Now!

Follow Us

Write to us