Skip to content

Commit b05a8ff

Browse files
committed
Add listing flag to dev, push, and share commands
1 parent 26c1921 commit b05a8ff

File tree

20 files changed

+747
-580
lines changed

20 files changed

+747
-580
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
@@ -5115,6 +5115,15 @@
51155115
"isOptional": true,
51165116
"environmentValue": "SHOPIFY_FLAG_HOST"
51175117
},
5118+
{
5119+
"filePath": "docs-shopify.dev/commands/interfaces/theme-dev.interface.ts",
5120+
"syntaxKind": "PropertySignature",
5121+
"name": "--listing <value>",
5122+
"value": "string",
5123+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
5124+
"isOptional": true,
5125+
"environmentValue": "SHOPIFY_FLAG_LISTING"
5126+
},
51185127
{
51195128
"filePath": "docs-shopify.dev/commands/interfaces/theme-dev.interface.ts",
51205129
"syntaxKind": "PropertySignature",
@@ -6352,6 +6361,15 @@
63526361
"name": "themepush",
63536362
"description": "",
63546363
"members": [
6364+
{
6365+
"filePath": "docs-shopify.dev/commands/interfaces/theme-push.interface.ts",
6366+
"syntaxKind": "PropertySignature",
6367+
"name": "--listing <value>",
6368+
"value": "string",
6369+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6370+
"isOptional": true,
6371+
"environmentValue": "SHOPIFY_FLAG_LISTING"
6372+
},
63556373
{
63566374
"filePath": "docs-shopify.dev/commands/interfaces/theme-push.interface.ts",
63576375
"syntaxKind": "PropertySignature",
@@ -6671,6 +6689,15 @@
66716689
"name": "themeshare",
66726690
"description": "",
66736691
"members": [
6692+
{
6693+
"filePath": "docs-shopify.dev/commands/interfaces/theme-share.interface.ts",
6694+
"syntaxKind": "PropertySignature",
6695+
"name": "--listing <value>",
6696+
"value": "string",
6697+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6698+
"isOptional": true,
6699+
"environmentValue": "SHOPIFY_FLAG_LISTING"
6700+
},
66746701
{
66756702
"filePath": "docs-shopify.dev/commands/interfaces/theme-share.interface.ts",
66766703
"syntaxKind": "PropertySignature",
@@ -6778,4 +6805,4 @@
67786805
"category": "general commands",
67796806
"related": []
67806807
}
6781-
]
6808+
]

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: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,9 +1824,9 @@ Uploads the current theme as a development theme to the connected store, then pr
18241824

18251825
```
18261826
USAGE
1827-
$ shopify theme dev [-e <value>] [--error-overlay silent|default] [--host <value>] [-x <value>]
1828-
[--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>] [--open] [--password
1829-
<value>] [--path <value>] [--port <value>] [-s <value>] [--store-password <value>] [-t <value>]
1827+
$ shopify theme dev [-e <value>] [--error-overlay silent|default] [--host <value>] [-x <value>] [--listing
1828+
<value>] [--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>] [--open]
1829+
[--password <value>] [--path <value>] [--port <value>] [-s <value>] [--store-password <value>] [-t <value>]
18301830
[--theme-editor-sync] [--verbose]
18311831
18321832
FLAGS
@@ -1860,6 +1860,10 @@ FLAGS
18601860
--host=<value>
18611861
Set which network interface the web server listens on. The default value is 127.0.0.1.
18621862
1863+
--listing=<value>
1864+
The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name]
1865+
directory.
1866+
18631867
--live-reload=<option>
18641868
[default: hot-reload] The live reload mode switches the server behavior when a file is modified:
18651869
- hot-reload Hot reloads local changes to CSS and sections (default)
@@ -2246,6 +2250,8 @@ FLAGS
22462250
-t, --theme=<value> Theme ID or name of the remote theme.
22472251
-u, --unpublished Create a new unpublished theme and push to it.
22482252
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed).
2253+
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
2254+
listings/[preset-name] directory.
22492255
--no-color Disable color output.
22502256
--password=<value> Password generated from the Theme Access app.
22512257
--path=<value> The path where you want to run the command. Defaults to the current working directory.
@@ -2326,12 +2332,15 @@ Creates a shareable, unpublished, and new theme on your theme library with a ran
23262332
23272333
```
23282334
USAGE
2329-
$ shopify theme share [-e <value>] [--no-color] [--password <value>] [--path <value>] [-s <value>] [--verbose]
2335+
$ shopify theme share [-e <value>] [--listing <value>] [--no-color] [--password <value>] [--path <value>] [-s
2336+
<value>] [--verbose]
23302337

23312338
FLAGS
23322339
-e, --environment=<value>... The environment to apply to the current command.
23332340
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
23342341
(example.myshopify.com, https://example.myshopify.com).
2342+
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
2343+
listings/[preset-name] directory.
23352344
--no-color Disable color output.
23362345
--password=<value> Password generated from the Theme Access app.
23372346
--path=<value> The path where you want to run the command. Defaults to the current working directory.

0 commit comments

Comments
 (0)