- This topic is empty.
-
AuthorPosts
-
August 6, 2016 at 5:56 am #9229David HoangKeymaster
I’m going to work on a Shopify theme, and I want to figure out how to run/edit it locally. I’d like to be able to the following, if possible:
- Pull all the Shopify theme code from the site to my local computer (ideally a single command line tool)
- Make edits locally, and run them locally or in a staging environment
- Push all the edits to the main Shopify site, again using a command line tool
Is this at all possible?
August 7, 2016 at 6:21 am #9230David HoangKeymasterShopify have built a tool for Mac that allows you to develop your theme locally, and sync with your store https://apps.shopify.com/desktop-theme-editor
I don’t know of anything for windows/Linux etc.
August 7, 2016 at 8:49 am #9237David HoangKeymasterThere are quite a few workflows you can use here.
1. Task runners
If you’re using either Gulp or Grunt locally for development, there are libraries out there that will upload your files to the store through API credentials of a Private App that you have to create. Most work by uploading the files you change, using a watcher.
- grunt-shopify
- grunt-shopify-upload
- gulp-shopify-upload (it’s my favourite since I use Gulp but has a known issue that sometimes it stops uploading files and you have to restart it).
2. Official Shopify Theme Kit
Theme Kit is a cross-platform CLI tool that was built by Shopify Employees. It can run on windows/linux/OS X. You can read more about it on Shopify Blog or download it directly. The alternative previously mentioned of Desktop Theme Editor is deprecated and has been replaced by Theme Kit.
3. Third-party SaaS Applications
Instead of watching for changes, these will work with a continuos integration workflow, where your latest push on a certain branch gets uploaded to the theme you’ve selected.
- Beanstalk. More specific information can be found on their landing page for Shopify, here.
- DeployBot. Their help article on Shopify has some information on how to get started.
Both options are from the same company. Here’s a comparison of both they’ve did on their blog.
4. Third-party libraries
-
There’s also an alternative not officially supported by Shopify which is a TextMate Bundle in case you use that OSX editor.
-
There’s an unofficial extended cli similar to theme kit but with further functionality called Quickshot, which I’ve just found out based on Matt’s response and seems pretty awesome. Some of the features they highlight are:
- Supports uploading to multiple Shopify stores and themes
- Easy to use configuration wizard
- Uploads/downloads in parallel greatly reducing transfer times
- Supports autocompiling scss locally before uploading to Shopify
- Supports autocompiling Babel/ES6 into modules which are easily used by – Requirejs and others
- Can use with .gitignore files or a custom .quickshotignore file.
- Can download/upload Shopify Blogs, Pages and Products! Easily transfer them between stores! Even the metafields! And edit them locally in your favorite editor.
August 7, 2016 at 9:52 am #9233David HoangKeymasterJuan’s answer is spot on.
There’s one more I know of which I believe is a little more advanced than Themekit (which I use) called Quickshot: https://quickshot.readme.io/v2.1/docs
May 27, 2017 at 4:09 am #9236David HoangKeymasterShopify recently released Slate, a new tool for theme development.
September 30, 2017 at 11:57 am #9231David HoangKeymasterInstall the state package by running the following commands:
npm install -g @shopify/slate slate theme theme-name
November 3, 2017 at 2:06 am #9232David HoangKeymasterIf you’re looking for completely offline development, it’s unfortunately not possible at this time. While the Slate/ThemeKit CLIs lets you code in your favorite text editor, an internet connection is still required because it likes to keep everything in sync at all times.
May 22, 2020 at 12:11 pm #9235David HoangKeymasterAs of 2020, Shopify has stopped support Slate so you can now use Themekit – https://shopify.github.io/themekit/
January 30, 2022 at 5:59 am #9234David HoangKeymaster2022 update
Currently it is not possible to run Shopify locally. There are only solutions, mentioned in other answers to edit files locally and upload it to Shopify. It makes the development hard.
I am working on a solution to emulate Shopify locally making development similar to WordPress, React or Angular. So you will see changes immediately, even without reloading the page and without the need to upload files to Shopify each time.
You can read more here: https://link.medium.com/6SGd1kcVdnb
-
AuthorPosts
- You must be logged in to reply to this topic.