cli
cli copied to clipboard
[Feature]: When using `shopify theme dev` prevent auto syncing between remote and local
What area(s) will this request affect?
Theme
What type of change do you want to see?
New feature
Overview
I want to be more explicit when changes should be pushed to the remote theme, not every time I shopify theme dev. Ideally, shopify theme dev should just be listening to local changes, not automatically merging upon startup.
Motivation
Deployments should be one way, not bidirectional.
👋 Hey @modermo,
Thank you for opening this issue and suggesting this feature.
Could you please share more details about this suggestion?
The reason I'm asking is that I believe the shopify theme dev command is not bi-directional already. This command is a one-way command; when theme files change, the CLI updates them in the theme library and shows the updated theme in the browser by relying on a proxy. However, shopify theme dev --theme-editor-sync maintains a bi-directional approach by polling changes from the theme library periodically.
shopify theme dev immediately syncs remote and local. It shouldn't do that by default because there is a risk of an unintentional sync of data. A great example of this is template json – adjusting settings in shopify admin will be overwritten by your locally edited template json, which is extremely dangerous as it overwrites work performed in the shopify's customise theme section.
There really should be an option akin to Theme Kit's "watch" command.
The --ignore flag is not a good solution for this because you have to remember to manually add a file/folder to the ignore list.
It is auto pushing my local changes to the remote as well.
It used to never do this, but it's been an occasional problem for some time.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
This is also happening for me. My remote theme changes (in the production store) are being overwritten completely by my local files whenever I run "shopify theme dev"