Skip to content

Commit 1161f7a

Browse files
committed
Update message of 'ignore' and 'only' flags
1 parent 97e0134 commit 1161f7a

File tree

9 files changed

+51
-44
lines changed

9 files changed

+51
-44
lines changed

.changeset/gentle-kids-draw.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/theme': patch
3+
'@shopify/cli': patch
4+
---
5+
6+
Update docs for 'ignore' and 'only' flags for theme push/pull

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface themepull {
1313
'-e, --environment <value>'?: string
1414

1515
/**
16-
* Skip downloading the specified files (Multiple flags allowed).
16+
* Skip downloading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
1717
* @environment SHOPIFY_FLAG_IGNORE
1818
*/
1919
'-x, --ignore <value>'?: string
@@ -37,7 +37,7 @@ export interface themepull {
3737
'-n, --nodelete'?: ''
3838

3939
/**
40-
* Download only the specified files (Multiple flags allowed).
40+
* Download only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
4141
* @environment SHOPIFY_FLAG_ONLY
4242
*/
4343
'-o, --only <value>'?: string

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface themepush {
1919
'-e, --environment <value>'?: string
2020

2121
/**
22-
* Skip uploading the specified files (Multiple flags allowed).
22+
* Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
2323
* @environment SHOPIFY_FLAG_IGNORE
2424
*/
2525
'-x, --ignore <value>'?: string
@@ -49,7 +49,7 @@ export interface themepush {
4949
'-n, --nodelete'?: ''
5050

5151
/**
52-
* Push only the specified files (Multiple flags allowed).
52+
* Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.
5353
* @environment SHOPIFY_FLAG_ONLY
5454
*/
5555
'-o, --only <value>'?: string

docs-shopify.dev/generated/generated_docs_data.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6411,7 +6411,7 @@
64116411
"syntaxKind": "PropertySignature",
64126412
"name": "-o, --only <value>",
64136413
"value": "string",
6414-
"description": "Download only the specified files (Multiple flags allowed).",
6414+
"description": "Download only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
64156415
"isOptional": true,
64166416
"environmentValue": "SHOPIFY_FLAG_ONLY"
64176417
},
@@ -6438,12 +6438,12 @@
64386438
"syntaxKind": "PropertySignature",
64396439
"name": "-x, --ignore <value>",
64406440
"value": "string",
6441-
"description": "Skip downloading the specified files (Multiple flags allowed).",
6441+
"description": "Skip downloading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
64426442
"isOptional": true,
64436443
"environmentValue": "SHOPIFY_FLAG_IGNORE"
64446444
}
64456445
],
6446-
"value": "export interface themepull {\n /**\n * Pull theme files from your remote development theme.\n * @environment SHOPIFY_FLAG_DEVELOPMENT\n */\n '-d, --development'?: ''\n\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Skip downloading the specified files (Multiple flags allowed).\n * @environment SHOPIFY_FLAG_IGNORE\n */\n '-x, --ignore <value>'?: string\n\n /**\n * Pull theme files from your remote live theme.\n * @environment SHOPIFY_FLAG_LIVE\n */\n '-l, --live'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Prevent deleting local files that don't exist remotely.\n * @environment SHOPIFY_FLAG_NODELETE\n */\n '-n, --nodelete'?: ''\n\n /**\n * Download only the specified files (Multiple flags allowed).\n * @environment SHOPIFY_FLAG_ONLY\n */\n '-o, --only <value>'?: string\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <value>'?: string\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store <value>'?: string\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme <value>'?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
6446+
"value": "export interface themepull {\n /**\n * Pull theme files from your remote development theme.\n * @environment SHOPIFY_FLAG_DEVELOPMENT\n */\n '-d, --development'?: ''\n\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Skip downloading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.\n * @environment SHOPIFY_FLAG_IGNORE\n */\n '-x, --ignore <value>'?: string\n\n /**\n * Pull theme files from your remote live theme.\n * @environment SHOPIFY_FLAG_LIVE\n */\n '-l, --live'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Prevent deleting local files that don't exist remotely.\n * @environment SHOPIFY_FLAG_NODELETE\n */\n '-n, --nodelete'?: ''\n\n /**\n * Download only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.\n * @environment SHOPIFY_FLAG_ONLY\n */\n '-o, --only <value>'?: string\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <value>'?: string\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store <value>'?: string\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme <value>'?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
64476447
}
64486448
}
64496449
}
@@ -6584,7 +6584,7 @@
65846584
"syntaxKind": "PropertySignature",
65856585
"name": "-o, --only <value>",
65866586
"value": "string",
6587-
"description": "Push only the specified files (Multiple flags allowed).",
6587+
"description": "Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
65886588
"isOptional": true,
65896589
"environmentValue": "SHOPIFY_FLAG_ONLY"
65906590
},
@@ -6629,12 +6629,12 @@
66296629
"syntaxKind": "PropertySignature",
66306630
"name": "-x, --ignore <value>",
66316631
"value": "string",
6632-
"description": "Skip uploading the specified files (Multiple flags allowed).",
6632+
"description": "Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
66336633
"isOptional": true,
66346634
"environmentValue": "SHOPIFY_FLAG_IGNORE"
66356635
}
66366636
],
6637-
"value": "export interface themepush {\n /**\n * Allow push to a live theme.\n * @environment SHOPIFY_FLAG_ALLOW_LIVE\n */\n '-a, --allow-live'?: ''\n\n /**\n * Push theme files from your remote development theme.\n * @environment SHOPIFY_FLAG_DEVELOPMENT\n */\n '-d, --development'?: ''\n\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Skip uploading the specified files (Multiple flags allowed).\n * @environment SHOPIFY_FLAG_IGNORE\n */\n '-x, --ignore <value>'?: string\n\n /**\n * Output the result as JSON.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Push theme files from your remote live theme.\n * @environment SHOPIFY_FLAG_LIVE\n */\n '-l, --live'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Prevent deleting remote files that don't exist locally.\n * @environment SHOPIFY_FLAG_NODELETE\n */\n '-n, --nodelete'?: ''\n\n /**\n * Push only the specified files (Multiple flags allowed).\n * @environment SHOPIFY_FLAG_ONLY\n */\n '-o, --only <value>'?: string\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <value>'?: string\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * Publish as the live theme after uploading.\n * @environment SHOPIFY_FLAG_PUBLISH\n */\n '-p, --publish'?: ''\n\n /**\n * Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store <value>'?: string\n\n /**\n * Require theme check to pass without errors before pushing. Warnings are allowed.\n * @environment SHOPIFY_FLAG_STRICT_PUSH\n */\n '--strict'?: ''\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme <value>'?: string\n\n /**\n * Create a new unpublished theme and push to it.\n * @environment SHOPIFY_FLAG_UNPUBLISHED\n */\n '-u, --unpublished'?: ''\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
6637+
"value": "export interface themepush {\n /**\n * Allow push to a live theme.\n * @environment SHOPIFY_FLAG_ALLOW_LIVE\n */\n '-a, --allow-live'?: ''\n\n /**\n * Push theme files from your remote development theme.\n * @environment SHOPIFY_FLAG_DEVELOPMENT\n */\n '-d, --development'?: ''\n\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.\n * @environment SHOPIFY_FLAG_IGNORE\n */\n '-x, --ignore <value>'?: string\n\n /**\n * Output the result as JSON.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Push theme files from your remote live theme.\n * @environment SHOPIFY_FLAG_LIVE\n */\n '-l, --live'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Prevent deleting remote files that don't exist locally.\n * @environment SHOPIFY_FLAG_NODELETE\n */\n '-n, --nodelete'?: ''\n\n /**\n * Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.\n * @environment SHOPIFY_FLAG_ONLY\n */\n '-o, --only <value>'?: string\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <value>'?: string\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * Publish as the live theme after uploading.\n * @environment SHOPIFY_FLAG_PUBLISH\n */\n '-p, --publish'?: ''\n\n /**\n * Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store <value>'?: string\n\n /**\n * Require theme check to pass without errors before pushing. Warnings are allowed.\n * @environment SHOPIFY_FLAG_STRICT_PUSH\n */\n '--strict'?: ''\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme <value>'?: string\n\n /**\n * Create a new unpublished theme and push to it.\n * @environment SHOPIFY_FLAG_UNPUBLISHED\n */\n '-u, --unpublished'?: ''\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
66386638
}
66396639
}
66406640
}

packages/cli/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,11 +2269,13 @@ FLAGS
22692269
-e, --environment=<value>... The environment to apply to the current command.
22702270
-l, --live Pull theme files from your remote live theme.
22712271
-n, --nodelete Prevent deleting local files that don't exist remotely.
2272-
-o, --only=<value>... Download only the specified files (Multiple flags allowed).
2272+
-o, --only=<value>... Download only the specified files (Multiple flags allowed). Wrap the value in double
2273+
quotes if you're using wildcards.
22732274
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
22742275
(example.myshopify.com, https://example.myshopify.com).
22752276
-t, --theme=<value> Theme ID or name of the remote theme.
2276-
-x, --ignore=<value>... Skip downloading the specified files (Multiple flags allowed).
2277+
-x, --ignore=<value>... Skip downloading the specified files (Multiple flags allowed). Wrap the value in double
2278+
quotes if you're using wildcards.
22772279
--no-color Disable color output.
22782280
--password=<value> Password generated from the Theme Access app.
22792281
--path=<value> The path where you want to run the command. Defaults to the current working directory.
@@ -2303,13 +2305,15 @@ FLAGS
23032305
-j, --json Output the result as JSON.
23042306
-l, --live Push theme files from your remote live theme.
23052307
-n, --nodelete Prevent deleting remote files that don't exist locally.
2306-
-o, --only=<value>... Push only the specified files (Multiple flags allowed).
2308+
-o, --only=<value>... Upload only the specified files (Multiple flags allowed). Wrap the value in double
2309+
quotes if you're using wildcards.
23072310
-p, --publish Publish as the live theme after uploading.
23082311
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
23092312
(example.myshopify.com, https://example.myshopify.com).
23102313
-t, --theme=<value> Theme ID or name of the remote theme.
23112314
-u, --unpublished Create a new unpublished theme and push to it.
2312-
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed).
2315+
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed). Wrap the value in double
2316+
quotes if you're using wildcards.
23132317
--no-color Disable color output.
23142318
--password=<value> Password generated from the Theme Access app.
23152319
--path=<value> The path where you want to run the command. Defaults to the current working directory.

packages/cli/oclif.manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6393,7 +6393,7 @@
63936393
},
63946394
"ignore": {
63956395
"char": "x",
6396-
"description": "Skip downloading the specified files (Multiple flags allowed).",
6396+
"description": "Skip downloading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
63976397
"env": "SHOPIFY_FLAG_IGNORE",
63986398
"hasDynamicHelp": false,
63996399
"multiple": true,
@@ -6426,7 +6426,7 @@
64266426
},
64276427
"only": {
64286428
"char": "o",
6429-
"description": "Download only the specified files (Multiple flags allowed).",
6429+
"description": "Download only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
64306430
"env": "SHOPIFY_FLAG_ONLY",
64316431
"hasDynamicHelp": false,
64326432
"multiple": true,
@@ -6532,7 +6532,7 @@
65326532
},
65336533
"ignore": {
65346534
"char": "x",
6535-
"description": "Skip uploading the specified files (Multiple flags allowed).",
6535+
"description": "Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
65366536
"env": "SHOPIFY_FLAG_IGNORE",
65376537
"hasDynamicHelp": false,
65386538
"multiple": true,
@@ -6574,7 +6574,7 @@
65746574
},
65756575
"only": {
65766576
"char": "o",
6577-
"description": "Push only the specified files (Multiple flags allowed).",
6577+
"description": "Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
65786578
"env": "SHOPIFY_FLAG_ONLY",
65796579
"hasDynamicHelp": false,
65806580
"multiple": true,

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {themeFlags} from '../../flags.js'
1+
import {globFlags, themeFlags} from '../../flags.js'
22
import ThemeCommand from '../../utilities/theme-command.js'
33
import {pull, PullFlags} from '../../services/pull.js'
44
import {globalFlags} from '@shopify/cli-kit/node/cli'
@@ -16,6 +16,7 @@ If no theme is specified, then you're prompted to select the theme to pull from
1616
static flags = {
1717
...globalFlags,
1818
...themeFlags,
19+
...globFlags('download'),
1920
theme: Flags.string({
2021
char: 't',
2122
description: 'Theme ID or name of the remote theme.',
@@ -36,18 +37,6 @@ If no theme is specified, then you're prompted to select the theme to pull from
3637
description: `Prevent deleting local files that don't exist remotely.`,
3738
env: 'SHOPIFY_FLAG_NODELETE',
3839
}),
39-
only: Flags.string({
40-
char: 'o',
41-
multiple: true,
42-
description: 'Download only the specified files (Multiple flags allowed).',
43-
env: 'SHOPIFY_FLAG_ONLY',
44-
}),
45-
ignore: Flags.string({
46-
char: 'x',
47-
multiple: true,
48-
description: 'Skip downloading the specified files (Multiple flags allowed).',
49-
env: 'SHOPIFY_FLAG_IGNORE',
50-
}),
5140
force: Flags.boolean({
5241
hidden: true,
5342
char: 'f',

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {themeFlags} from '../../flags.js'
1+
import {globFlags, themeFlags} from '../../flags.js'
22
import ThemeCommand from '../../utilities/theme-command.js'
33
import {push, PushFlags} from '../../services/push.js'
44
import {Flags} from '@oclif/core'
@@ -43,6 +43,7 @@ export default class Push extends ThemeCommand {
4343
static flags = {
4444
...globalFlags,
4545
...themeFlags,
46+
...globFlags('upload'),
4647
...jsonFlag,
4748
theme: Flags.string({
4849
char: 't',
@@ -69,18 +70,6 @@ export default class Push extends ThemeCommand {
6970
description: `Prevent deleting remote files that don't exist locally.`,
7071
env: 'SHOPIFY_FLAG_NODELETE',
7172
}),
72-
only: Flags.string({
73-
char: 'o',
74-
description: 'Push only the specified files (Multiple flags allowed).',
75-
multiple: true,
76-
env: 'SHOPIFY_FLAG_ONLY',
77-
}),
78-
ignore: Flags.string({
79-
char: 'x',
80-
description: 'Skip uploading the specified files (Multiple flags allowed).',
81-
multiple: true,
82-
env: 'SHOPIFY_FLAG_IGNORE',
83-
}),
8473
'allow-live': Flags.boolean({
8574
char: 'a',
8675
description: 'Allow push to a live theme.',

packages/theme/src/cli/flags.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,22 @@ export const themeFlags = {
4141
multiple: true,
4242
}),
4343
}
44+
45+
const globQuotesDescription = "Wrap the value in double quotes if you're using wildcards."
46+
47+
export const globFlags = (action: 'download' | 'upload') => ({
48+
only: Flags.string({
49+
char: 'o',
50+
multiple: true,
51+
description: `${
52+
action.charAt(0).toUpperCase() + action.slice(1)
53+
} only the specified files (Multiple flags allowed). ${globQuotesDescription}`,
54+
env: 'SHOPIFY_FLAG_ONLY',
55+
}),
56+
ignore: Flags.string({
57+
char: 'x',
58+
multiple: true,
59+
description: `Skip ${action}ing the specified files (Multiple flags allowed). ${globQuotesDescription}`,
60+
env: 'SHOPIFY_FLAG_IGNORE',
61+
}),
62+
})

0 commit comments

Comments
 (0)