These instructions can be found on the Theme Kit website, but our focus is purely automatic file deployment for our theme. The initial installation for operating systems are different, but after that instructions are the same.
- Open up the command line tool, Terminal found in Applications folder.
- Install homebrew. Using the provided link, follow instructions on installation.
- Run commands brew tap shopify/shopify and brew install themekit
- Install chocolatey. Using the provided link, follow instructions on installation.
- Open up the command line tool, your choice on Windows, PowerShell is popular.
- Run command choco install themekit
We are done with initial setup. Now it's time to install Theme Kit private app to your Shopify store.
- Go to your Shopify dashboard click Apps in the sidebar.
- Click Manage private apps at the bottom of the page.
- Click Create new private app.
- Fill out the app information
- Private app name: Themekit
- Emergency developer email: use your email
- Admin API: Click "Show inactive Admin API permissions"
- Go to Themes and select Read and write
- Click Save
- Click Create App
- Copy your newly generated API Password
- Paste into your text editor of choice to use later
- Go to the customize screen on the theme you want to upload your files
- In the url, find and save the Theme ID number right before the end of the url. For example, https://yourshopifystore.myshopify.com/admin/themes/108575916200/editor
- Inside your theme, create a config.yml file and add the following contents:
development: password: api_password theme_id: "108575916200" store: yourshopifystore.myshopify.com ignores: - themekit_ignores.txt
- Inside your theme, create themekit_ignores.txt file and add the following contents:
# plain file names config/settings_data.json config.yml
- In your command line application, use cd to go to your theme folder destination and use command theme watch
- You will have the message "Watching for file changes to theme 108575916200"
- Now you can start saving files and they will automatically upload to your Shopify theme
The themekit_ignores.txt file ignores files to upload to the theme. We ignore config/settings_data.json because this is where our theme settings from the Shopify customization page are stored and we don't want to overwrite them. We ignore the config.yml file to not upload our Theme Kit settings.
If you run theme watch in a directory that doesn't have a config.yml file you will get an error.
That's it! In the next blog we will start adding components for the Shopify blog.