Skip to content

Commit 5d0dcaf

Browse files
committed
Add listing flag to dev, push, and share commands
1 parent 9d21b64 commit 5d0dcaf

File tree

20 files changed

+467
-17
lines changed

20 files changed

+467
-17
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: 31 additions & 4 deletions
Large diffs are not rendered by default.

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
@@ -1822,9 +1822,9 @@ Uploads the current theme as a development theme to the connected store, then pr
18221822

18231823
```
18241824
USAGE
1825-
$ shopify theme dev [-e <value>] [--error-overlay silent|default] [--host <value>] [-x <value>]
1826-
[--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>] [--open] [--password
1827-
<value>] [--path <value>] [--port <value>] [-s <value>] [--store-password <value>] [-t <value>]
1825+
$ shopify theme dev [-e <value>] [--error-overlay silent|default] [--host <value>] [-x <value>] [--listing
1826+
<value>] [--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>] [--open]
1827+
[--password <value>] [--path <value>] [--port <value>] [-s <value>] [--store-password <value>] [-t <value>]
18281828
[--theme-editor-sync] [--verbose]
18291829
18301830
FLAGS
@@ -1858,6 +1858,10 @@ FLAGS
18581858
--host=<value>
18591859
Set which network interface the web server listens on. The default value is 127.0.0.1.
18601860
1861+
--listing=<value>
1862+
The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name]
1863+
directory.
1864+
18611865
--live-reload=<option>
18621866
[default: hot-reload] The live reload mode switches the server behavior when a file is modified:
18631867
- hot-reload Hot reloads local changes to CSS and sections (default)
@@ -2238,6 +2242,8 @@ FLAGS
22382242
-t, --theme=<value> Theme ID or name of the remote theme.
22392243
-u, --unpublished Create a new unpublished theme and push to it.
22402244
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed).
2245+
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
2246+
listings/[preset-name] directory.
22412247
--no-color Disable color output.
22422248
--password=<value> Password generated from the Theme Access app.
22432249
--path=<value> The path to your theme directory.
@@ -2317,12 +2323,15 @@ Creates a shareable, unpublished, and new theme on your theme library with a ran
23172323
23182324
```
23192325
USAGE
2320-
$ shopify theme share [-e <value>] [--no-color] [--password <value>] [--path <value>] [-s <value>] [--verbose]
2326+
$ shopify theme share [-e <value>] [--listing <value>] [--no-color] [--password <value>] [--path <value>] [-s
2327+
<value>] [--verbose]
23212328

23222329
FLAGS
23232330
-e, --environment=<value>... The environment to apply to the current command.
23242331
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
23252332
(example.myshopify.com, https://example.myshopify.com).
2333+
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
2334+
listings/[preset-name] directory.
23262335
--no-color Disable color output.
23272336
--password=<value> Password generated from the Theme Access app.
23282337
--path=<value> The path to your theme directory.

packages/cli/oclif.manifest.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5246,6 +5246,14 @@
52465246
"name": "ignore",
52475247
"type": "option"
52485248
},
5249+
"listing": {
5250+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
5251+
"env": "SHOPIFY_FLAG_LISTING",
5252+
"hasDynamicHelp": false,
5253+
"multiple": false,
5254+
"name": "listing",
5255+
"type": "option"
5256+
},
52495257
"live-reload": {
52505258
"default": "hot-reload",
52515259
"description": "The live reload mode switches the server behavior when a file is modified:\n- hot-reload Hot reloads local changes to CSS and sections (default)\n- full-page Always refreshes the entire page\n- off Deactivate live reload",
@@ -6274,6 +6282,14 @@
62746282
"name": "json",
62756283
"type": "boolean"
62766284
},
6285+
"listing": {
6286+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6287+
"env": "SHOPIFY_FLAG_LISTING",
6288+
"hasDynamicHelp": false,
6289+
"multiple": false,
6290+
"name": "listing",
6291+
"type": "option"
6292+
},
62776293
"live": {
62786294
"allowNo": false,
62796295
"char": "l",
@@ -6542,6 +6558,14 @@
65426558
"name": "ignore",
65436559
"type": "option"
65446560
},
6561+
"listing": {
6562+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6563+
"env": "SHOPIFY_FLAG_LISTING",
6564+
"hasDynamicHelp": false,
6565+
"multiple": false,
6566+
"name": "listing",
6567+
"type": "option"
6568+
},
65456569
"live-reload": {
65466570
"default": "hot-reload",
65476571
"description": "The live reload mode switches the server behavior when a file is modified:\n- hot-reload Hot reloads local changes to CSS and sections (default)\n- full-page Always refreshes the entire page\n- off Deactivate live reload",
@@ -6711,6 +6735,14 @@
67116735
"name": "force",
67126736
"type": "boolean"
67136737
},
6738+
"listing": {
6739+
"description": "The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",
6740+
"env": "SHOPIFY_FLAG_LISTING",
6741+
"hasDynamicHelp": false,
6742+
"multiple": false,
6743+
"name": "listing",
6744+
"type": "option"
6745+
},
67146746
"no-color": {
67156747
"allowNo": false,
67166748
"description": "Disable color output.",
@@ -6940,4 +6972,4 @@
69406972
}
69416973
},
69426974
"version": "3.81.1"
6943-
}
6975+
}

packages/theme/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@shopify/cli-kit": "3.81.1",
4747
"@shopify/theme-check-node": "3.17.0",
4848
"@shopify/theme-language-server-node": "2.15.2",
49+
"change-case": "4.1.2",
4950
"chokidar": "3.6.0",
5051
"h3": "1.13.0",
5152
"yaml": "2.7.0"

packages/theme/src/cli/commands/theme/dev.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ You can run this command only in a directory that matches the [default Shopify t
8282
description: 'Theme ID or name of the remote theme.',
8383
env: 'SHOPIFY_FLAG_THEME_ID',
8484
}),
85+
listing: Flags.string({
86+
description:
87+
'The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.',
88+
env: 'SHOPIFY_FLAG_LISTING',
89+
}),
8590
nodelete: Flags.boolean({
8691
char: 'n',
8792
description:
@@ -153,6 +158,7 @@ You can run this command only in a directory that matches the [default Shopify t
153158
password: flags.password,
154159
storePassword: flags['store-password'],
155160
theme,
161+
listing: flags.listing,
156162
host: flags.host,
157163
port: flags.port,
158164
'live-reload': flags['live-reload'] as LiveReload,

0 commit comments

Comments
 (0)