Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: When using shopify theme dev prevent auto syncing between remote and local #3810

Open
modermo opened this issue Apr 30, 2024 · 3 comments
Labels
Area: @shopify/theme @shopify/theme package issues Type: Enhancement New feature or request

Comments

@modermo
Copy link

modermo commented Apr 30, 2024

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.

@modermo modermo added the Type: Enhancement New feature or request label Apr 30, 2024
@karreiro karreiro added the Area: @shopify/theme @shopify/theme package issues label Apr 30, 2024
@karreiro
Copy link
Contributor

👋 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.

@modermo
Copy link
Author

modermo commented May 2, 2024

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.

@alexmorange
Copy link

alexmorange commented May 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants