themekit icon indicating copy to clipboard operation
themekit copied to clipboard

theme new should include flag for uploading existing directory

Open ghost opened this issue 5 years ago • 2 comments

Currently, theme new will generate a new theme in the directory you specify. There should be a way to simply create a new theme id using the existing theme you're in. I'd like to see a flag that specifies ThemeKit to upload and sync the current working directory, but use the new theme id and name. My use case is simply managing new theme releases by creating a new theme id, then publishing the new theme and restarting the process.

ghost avatar Dec 07 '20 22:12 ghost

I agree completely, I am trying to figure out how to add a theme to additional environments using themekit, my use case is I've started a theme in a development store and want to now add this theme using themekit to another store (i.e production).

natereist avatar Jan 18 '21 19:01 natereist

I had the same use case, but in my case I actually could upload my existing theme to a new store. I ran theme new --env=my_env from within the root of an existing theme. I had already defined my_env with a store and password key in config.yml (but not theme_id, because that one was to be created). This did actually upload the existing directory.

But that is not what I expected, since it wasn't documented. See this issue: https://github.com/Shopify/themekit/issues/910

EDIT: what I did is apparently a very new feature only supported since v1.1.6 (Feb 3). See https://github.com/Shopify/themekit/blob/b204edd3a4e1d96559bf2bc75272e0f28e4a07cc/changelog.txt#L3

You can check if you can replicate what I did, which should solve your problem. But I agree that it would be good to have a flag for this, and not have it as the default (undocumented) behavior.

th0rgall avatar Feb 10 '21 10:02 th0rgall