Skip to content

Commit e3eed72

Browse files
authored
Merge pull request #6211 from Shopify/08-05-update_message_of_ignore_and_only_flags
Update message of 'ignore' and 'only' flags
2 parents 8f16ffd + 1161f7a commit e3eed72

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
@@ -6384,7 +6384,7 @@
63846384
"syntaxKind": "PropertySignature",
63856385
"name": "-o, --only <value>",
63866386
"value": "string",
6387-
"description": "Download only the specified files (Multiple flags allowed).",
6387+
"description": "Download only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
63886388
"isOptional": true,
63896389
"environmentValue": "SHOPIFY_FLAG_ONLY"
63906390
},
@@ -6411,12 +6411,12 @@
64116411
"syntaxKind": "PropertySignature",
64126412
"name": "-x, --ignore <value>",
64136413
"value": "string",
6414-
"description": "Skip downloading the specified files (Multiple flags allowed).",
6414+
"description": "Skip downloading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
64156415
"isOptional": true,
64166416
"environmentValue": "SHOPIFY_FLAG_IGNORE"
64176417
}
64186418
],
6419-
"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}"
6419+
"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}"
64206420
}
64216421
}
64226422
}
@@ -6557,7 +6557,7 @@
65576557
"syntaxKind": "PropertySignature",
65586558
"name": "-o, --only <value>",
65596559
"value": "string",
6560-
"description": "Push only the specified files (Multiple flags allowed).",
6560+
"description": "Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
65616561
"isOptional": true,
65626562
"environmentValue": "SHOPIFY_FLAG_ONLY"
65636563
},
@@ -6602,12 +6602,12 @@
66026602
"syntaxKind": "PropertySignature",
66036603
"name": "-x, --ignore <value>",
66046604
"value": "string",
6605-
"description": "Skip uploading the specified files (Multiple flags allowed).",
6605+
"description": "Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
66066606
"isOptional": true,
66076607
"environmentValue": "SHOPIFY_FLAG_IGNORE"
66086608
}
66096609
],
6610-
"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}"
6610+
"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}"
66116611
}
66126612
}
66136613
}

packages/cli/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,11 +2265,13 @@ FLAGS
22652265
-e, --environment=<value>... The environment to apply to the current command.
22662266
-l, --live Pull theme files from your remote live theme.
22672267
-n, --nodelete Prevent deleting local files that don't exist remotely.
2268-
-o, --only=<value>... Download only the specified files (Multiple flags allowed).
2268+
-o, --only=<value>... Download only the specified files (Multiple flags allowed). Wrap the value in double
2269+
quotes if you're using wildcards.
22692270
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
22702271
(example.myshopify.com, https://example.myshopify.com).
22712272
-t, --theme=<value> Theme ID or name of the remote theme.
2272-
-x, --ignore=<value>... Skip downloading the specified files (Multiple flags allowed).
2273+
-x, --ignore=<value>... Skip downloading the specified files (Multiple flags allowed). Wrap the value in double
2274+
quotes if you're using wildcards.
22732275
--no-color Disable color output.
22742276
--password=<value> Password generated from the Theme Access app.
22752277
--path=<value> The path where you want to run the command. Defaults to the current working directory.
@@ -2299,13 +2301,15 @@ FLAGS
22992301
-j, --json Output the result as JSON.
23002302
-l, --live Push theme files from your remote live theme.
23012303
-n, --nodelete Prevent deleting remote files that don't exist locally.
2302-
-o, --only=<value>... Push only the specified files (Multiple flags allowed).
2304+
-o, --only=<value>... Upload only the specified files (Multiple flags allowed). Wrap the value in double
2305+
quotes if you're using wildcards.
23032306
-p, --publish Publish as the live theme after uploading.
23042307
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
23052308
(example.myshopify.com, https://example.myshopify.com).
23062309
-t, --theme=<value> Theme ID or name of the remote theme.
23072310
-u, --unpublished Create a new unpublished theme and push to it.
2308-
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed).
2311+
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed). Wrap the value in double
2312+
quotes if you're using wildcards.
23092313
--no-color Disable color output.
23102314
--password=<value> Password generated from the Theme Access app.
23112315
--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
@@ -6373,7 +6373,7 @@
63736373
},
63746374
"ignore": {
63756375
"char": "x",
6376-
"description": "Skip downloading the specified files (Multiple flags allowed).",
6376+
"description": "Skip downloading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
63776377
"env": "SHOPIFY_FLAG_IGNORE",
63786378
"hasDynamicHelp": false,
63796379
"multiple": true,
@@ -6406,7 +6406,7 @@
64066406
},
64076407
"only": {
64086408
"char": "o",
6409-
"description": "Download only the specified files (Multiple flags allowed).",
6409+
"description": "Download only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
64106410
"env": "SHOPIFY_FLAG_ONLY",
64116411
"hasDynamicHelp": false,
64126412
"multiple": true,
@@ -6512,7 +6512,7 @@
65126512
},
65136513
"ignore": {
65146514
"char": "x",
6515-
"description": "Skip uploading the specified files (Multiple flags allowed).",
6515+
"description": "Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
65166516
"env": "SHOPIFY_FLAG_IGNORE",
65176517
"hasDynamicHelp": false,
65186518
"multiple": true,
@@ -6554,7 +6554,7 @@
65546554
},
65556555
"only": {
65566556
"char": "o",
6557-
"description": "Push only the specified files (Multiple flags allowed).",
6557+
"description": "Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards.",
65586558
"env": "SHOPIFY_FLAG_ONLY",
65596559
"hasDynamicHelp": false,
65606560
"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)