-
Notifications
You must be signed in to change notification settings - Fork 201
Add theme (-t
/--theme=NAME_OR_ID
) parameter to theme push
/theme pull
commands
#1877
Conversation
Hi, @MeredithCastile! Thanks again for the thoughts you've put into this and for the questions you've raised. @macournoyer and I talked a bit about this PR in the latest theme meeting. Considering some extra context for this use case:
We've reasoned that bundling the flags is a great idea 🚀 Thus, users could now rely on the Thanks! :) |
@karreiro Seems like a good solution! Thanks. 🙌 Please do make sure that the --help and docs are updated to reflect these changes. If you run into any problems updating the command in .dev docs, I'd recommend reaching out to @shainaraskas. |
-t
/--themename=THEMENAME
) parameter to theme push
/theme pull
commands-t
/--theme=THEME
) parameter to theme push
/theme pull
commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's confusing to have two args do the same thing now :/
-i ID
and -t ID
But looks good on the code side.
parameter to `theme push`/`theme pull` commands
- `-t`/`--theme` accepts the theme ID or name
Improve `--help` from `--theme=THEME` to `--theme=NAME_OR_ID`
-t
/--theme=THEME
) parameter to theme push
/theme pull
commands-t
/--theme=NAME_OR_ID
) parameter to theme push
/theme pull
commands
Thanks for the suggestions, @macournoyer! I agree that having two args for the same thing is odd. So, in a new commit, I've deprected the Also, +1 for removing it from the usage doc. Does it sound like a good plan? :) |
YES! 🙏 |
WHY are these changes introduced?
Users can't set the theme name when running commands like
shopify theme push -u
(#1431).WHAT is this pull request doing?
This PR introduces a new parameter representing the theme name
-t
/--theme=NAME_OR_ID
. So, now users can perform operationsshopify theme push -u -t my_theme
.For consistency, this PR also:
-t
/--theme=NAME_OR_ID
totheme pull
-t
/--theme=NAME_OR_ID
totheme push
(globally, even without the--unpublished
parameter)Thus, now users may rely on the
-t <NAME_OR_ID>
topush
/pull
a theme, instead of only relying on-i <ID>
.How to test your changes?
Run the following commands for checking the impact of the new parameter on
theme push
:Run the following commands for checking the impact of the new parameter on
theme pull
:Post-release steps
Update documentation with the new
-t
/--theme=THEME
parameter: https://shopify.dev/themes/tools/cli/theme-commands#push, https://shopify.dev/themes/tools/cli/theme-commands#pull.Update checklist