Skip to content

Commit 5d4ee30

Browse files
committed
Add listing flag to dev, push, and share commands
1 parent 0d253f1 commit 5d4ee30

File tree

20 files changed

+741
-574
lines changed

20 files changed

+741
-574
lines changed

.changeset/polite-eyes-warn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@shopify/cli-kit': patch
3+
'@shopify/theme': patch
4+
'@shopify/cli': patch
5+
---
6+
7+
Add --listing flag to theme dev, push, and share commands

docs-shopify.dev/commands/interfaces/theme-dev.interface.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface themedev {
1010
* Controls the visibility of the error overlay when an theme asset upload fails:
1111
- silent Prevents the error overlay from appearing.
1212
- default Displays the error overlay.
13-
13+
1414
* @environment SHOPIFY_FLAG_ERROR_OVERLAY
1515
*/
1616
'--error-overlay <value>'?: string
@@ -27,6 +27,12 @@ export interface themedev {
2727
*/
2828
'-x, --ignore <value>'?: string
2929

30+
/**
31+
* The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.
32+
* @environment SHOPIFY_FLAG_LISTING
33+
*/
34+
'--listing <value>'?: string
35+
3036
/**
3137
* The live reload mode switches the server behavior when a file is modified:
3238
- hot-reload Hot reloads local changes to CSS and sections (default)

docs-shopify.dev/commands/interfaces/theme-push.interface.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ export interface themepush {
3030
*/
3131
'-j, --json'?: ''
3232

33+
/**
34+
* The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.
35+
* @environment SHOPIFY_FLAG_LISTING
36+
*/
37+
'--listing <value>'?: string
38+
3339
/**
3440
* Push theme files from your remote live theme.
3541
* @environment SHOPIFY_FLAG_LIVE

docs-shopify.dev/commands/interfaces/theme-share.interface.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ export interface themeshare {
66
*/
77
'-e, --environment <value>'?: string
88

9+
/**
10+
* The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.
11+
* @environment SHOPIFY_FLAG_LISTING
12+
*/
13+
'--listing <value>'?: string
14+
915
/**
1016
* Disable color output.
1117
* @environment SHOPIFY_FLAG_NO_COLOR

docs-shopify.dev/generated/generated_docs_data.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5144,6 +5144,15 @@
51445144
"isOptional": true,
51455145
"environmentValue": "SHOPIFY_FLAG_HOST"
51465146
},
5147+
{
5148+
"filePath": "docs-shopify.dev/commands/interfaces/theme-dev.interface.ts",
5149+
"syntaxKind": "PropertySignature",
5150+
"name": "--listing <value>",
5151+
"value": "string",
5152+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
5153+
"isOptional": true,
5154+
"environmentValue": "SHOPIFY_FLAG_LISTING"
5155+
},
51475156
{
51485157
"filePath": "docs-shopify.dev/commands/interfaces/theme-dev.interface.ts",
51495158
"syntaxKind": "PropertySignature",
@@ -6500,6 +6509,15 @@
65006509
"name": "themepush",
65016510
"description": "",
65026511
"members": [
6512+
{
6513+
"filePath": "docs-shopify.dev/commands/interfaces/theme-push.interface.ts",
6514+
"syntaxKind": "PropertySignature",
6515+
"name": "--listing <value>",
6516+
"value": "string",
6517+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6518+
"isOptional": true,
6519+
"environmentValue": "SHOPIFY_FLAG_LISTING"
6520+
},
65036521
{
65046522
"filePath": "docs-shopify.dev/commands/interfaces/theme-push.interface.ts",
65056523
"syntaxKind": "PropertySignature",
@@ -6819,6 +6837,15 @@
68196837
"name": "themeshare",
68206838
"description": "",
68216839
"members": [
6840+
{
6841+
"filePath": "docs-shopify.dev/commands/interfaces/theme-share.interface.ts",
6842+
"syntaxKind": "PropertySignature",
6843+
"name": "--listing <value>",
6844+
"value": "string",
6845+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6846+
"isOptional": true,
6847+
"environmentValue": "SHOPIFY_FLAG_LISTING"
6848+
},
68226849
{
68236850
"filePath": "docs-shopify.dev/commands/interfaces/theme-share.interface.ts",
68246851
"syntaxKind": "PropertySignature",
@@ -6926,4 +6953,4 @@
69266953
"category": "general commands",
69276954
"related": []
69286955
}
6929-
]
6956+
]

packages/cli-kit/src/public/node/themes/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ export type ThemeFSEventPayload<T extends ThemeFSEventName = 'add'> = (ThemeFSEv
2727

2828
export interface ThemeFileSystemOptions {
2929
filters?: {ignore?: string[]; only?: string[]}
30-
notify?: string
30+
listing?: string
3131
noDelete?: boolean
32+
notify?: string
3233
}
3334

3435
/**

packages/cli/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,8 +1804,8 @@ Uploads the current theme as a development theme to the connected store, then pr
18041804

18051805
```
18061806
USAGE
1807-
$ shopify theme dev [-e <value>...] [--error-overlay silent|default] [--host <value>] [-x <value>...]
1808-
[--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>...] [--open] [--password
1807+
$ shopify theme dev [-e <value>...] [--error-overlay silent|default] [--host <value>] [-x <value>...] [--listing
1808+
<value>] [--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>...] [--open] [--password
18091809
<value>] [--path <value>] [--port <value>] [-s <value>] [--store-password <value>] [-t <value>]
18101810
[--theme-editor-sync] [--verbose]
18111811
@@ -1840,6 +1840,10 @@ FLAGS
18401840
--host=<value>
18411841
Set which network interface the web server listens on. The default value is 127.0.0.1.
18421842
1843+
--listing=<value>
1844+
The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name]
1845+
directory.
1846+
18431847
--live-reload=<option>
18441848
[default: hot-reload] The live reload mode switches the server behavior when a file is modified:
18451849
- hot-reload Hot reloads local changes to CSS and sections (default)
@@ -2289,6 +2293,8 @@ FLAGS
22892293
-u, --unpublished Create a new unpublished theme and push to it.
22902294
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed). Wrap the value in double
22912295
quotes if you're using wildcards.
2296+
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
2297+
listings/[preset-name] directory.
22922298
--no-color Disable color output.
22932299
--password=<value> Password generated from the Theme Access app.
22942300
--path=<value> The path where you want to run the command. Defaults to the current working directory.
@@ -2369,13 +2375,15 @@ Creates a shareable, unpublished, and new theme on your theme library with a ran
23692375
23702376
```
23712377
USAGE
2372-
$ shopify theme share [-e <value>...] [--no-color] [--password <value>] [--path <value>] [-s <value>]
2378+
$ shopify theme share [-e <value>...] [--listing <value>] [--no-color] [--password <value>] [--path <value>] [-s <value>]
23732379
[--verbose]
23742380

23752381
FLAGS
23762382
-e, --environment=<value>... The environment to apply to the current command.
23772383
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
23782384
(example.myshopify.com, https://example.myshopify.com).
2385+
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
2386+
listings/[preset-name] directory.
23792387
--no-color Disable color output.
23802388
--password=<value> Password generated from the Theme Access app.
23812389
--path=<value> The path where you want to run the command. Defaults to the current working directory.

0 commit comments

Comments
 (0)