Skip to content

Commit 044c7db

Browse files
committed
Add theme duplicate dev docs
A new `theme duplicate` command is being added to duplicate store themes and it needs reference docs.
1 parent 521fb07 commit 044c7db

File tree

4 files changed

+241
-0
lines changed

4 files changed

+241
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shopify theme duplicate
2+
3+
shopify theme duplicate --theme 10 --name 'New Theme'
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// This is an autogenerated file. Don't edit this file manually.
2+
export interface themeduplicate {
3+
/**
4+
* The environment to apply to the current command.
5+
* @environment SHOPIFY_FLAG_ENVIRONMENT
6+
*/
7+
'-e, --environment <value>'?: string
8+
9+
/**
10+
* Force the duplicate operation to run without prompts or confirmations.
11+
* @environment SHOPIFY_FLAG_FORCE
12+
*/
13+
'-f, --force'?: ''
14+
15+
/**
16+
* Output the result as JSON.
17+
* @environment SHOPIFY_FLAG_JSON
18+
*/
19+
'-j, --json'?: ''
20+
21+
/**
22+
* Name of the newly duplicated theme.
23+
* @environment SHOPIFY_FLAG_NAME
24+
*/
25+
'-n, --name <value>'?: string
26+
27+
/**
28+
* Disable color output.
29+
* @environment SHOPIFY_FLAG_NO_COLOR
30+
*/
31+
'--no-color'?: ''
32+
33+
/**
34+
* Password generated from the Theme Access app.
35+
* @environment SHOPIFY_CLI_THEME_TOKEN
36+
*/
37+
'--password <value>'?: string
38+
39+
/**
40+
* Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).
41+
* @environment SHOPIFY_FLAG_STORE
42+
*/
43+
'-s, --store <value>'?: string
44+
45+
/**
46+
* Theme ID or name of the remote theme.
47+
* @environment SHOPIFY_FLAG_THEME_ID
48+
*/
49+
'-t, --theme <value>'?: string
50+
51+
/**
52+
* Increase the verbosity of the output.
53+
* @environment SHOPIFY_FLAG_VERBOSE
54+
*/
55+
'--verbose'?: ''
56+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// This is an autogenerated file. Don't edit this file manually.
2+
import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'
3+
4+
const data: ReferenceEntityTemplateSchema = {
5+
name: 'theme duplicate',
6+
description: `If you want to duplicate your local theme, you need to run \`shopify theme push\` first.
7+
8+
If no theme ID is specified, you're prompted to select the theme that you want to duplicate from the list of themes in your store. You're asked to confirm that you want to duplicate the specified theme.
9+
10+
Prompts and confirmations are not shown when duplicate is run in a CI environment or the \`--force\` flag is used, therefore you must specify a theme ID using the \`--theme\` flag.
11+
12+
You can optionally name the duplicated theme using the \`--name\` flag.
13+
14+
If you use the \`--json\` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.
15+
16+
Sample JSON output:
17+
18+
\`\`\`json
19+
{
20+
"theme": {
21+
"id": 108267175958,
22+
"name": "A Duplicated Theme",
23+
"role": "unpublished",
24+
"shop": "mystore.myshopify.com"
25+
}
26+
}
27+
\`\`\`
28+
29+
\`\`\`json
30+
{
31+
"message": "The theme 'Summer Edition' could not be duplicated due to errors",
32+
"errors": ["Maximum number of themes reached"],
33+
"requestId": "12345-abcde-67890"
34+
}
35+
\`\`\``,
36+
overviewPreviewDescription: `Duplicates a theme from your theme library.`,
37+
type: 'command',
38+
isVisualComponent: false,
39+
defaultExample: {
40+
codeblock: {
41+
tabs: [
42+
{
43+
title: 'theme duplicate',
44+
code: './examples/theme-duplicate.example.sh',
45+
language: 'bash',
46+
},
47+
],
48+
title: 'theme duplicate',
49+
},
50+
},
51+
definitions: [
52+
{
53+
title: 'Flags',
54+
description: 'The following flags are available for the `theme duplicate` command:',
55+
type: 'themeduplicate',
56+
},
57+
],
58+
category: 'theme',
59+
related: [
60+
],
61+
}
62+
63+
export default data

docs-shopify.dev/generated/generated_docs_data.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5268,6 +5268,125 @@
52685268
"category": "theme",
52695269
"related": []
52705270
},
5271+
{
5272+
"name": "theme duplicate",
5273+
"description": "If you want to duplicate your local theme, you need to run `shopify theme push` first.\n\nIf no theme ID is specified, you're prompted to select the theme that you want to duplicate from the list of themes in your store. You're asked to confirm that you want to duplicate the specified theme.\n\nPrompts and confirmations are not shown when duplicate is run in a CI environment or the `--force` flag is used, therefore you must specify a theme ID using the `--theme` flag.\n\nYou can optionally name the duplicated theme using the `--name` flag.\n\nIf you use the `--json` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.\n\nSample JSON output:\n\n```json\n{\n \"theme\": {\n \"id\": 108267175958,\n \"name\": \"A Duplicated Theme\",\n \"role\": \"unpublished\",\n \"shop\": \"mystore.myshopify.com\"\n }\n}\n```\n\n```json\n{\n \"message\": \"The theme 'Summer Edition' could not be duplicated due to errors\",\n \"errors\": [\"Maximum number of themes reached\"],\n \"requestId\": \"12345-abcde-67890\"\n}\n```",
5274+
"overviewPreviewDescription": "Duplicates a theme from your theme library.",
5275+
"type": "command",
5276+
"isVisualComponent": false,
5277+
"defaultExample": {
5278+
"codeblock": {
5279+
"tabs": [
5280+
{
5281+
"title": "theme duplicate",
5282+
"code": "shopify theme duplicate\n\nshopify theme duplicate --theme 10 --name 'New Theme'",
5283+
"language": "bash"
5284+
}
5285+
],
5286+
"title": "theme duplicate"
5287+
}
5288+
},
5289+
"definitions": [
5290+
{
5291+
"title": "Flags",
5292+
"description": "The following flags are available for the `theme duplicate` command:",
5293+
"type": "themeduplicate",
5294+
"typeDefinitions": {
5295+
"themeduplicate": {
5296+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5297+
"name": "themeduplicate",
5298+
"description": "",
5299+
"members": [
5300+
{
5301+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5302+
"syntaxKind": "PropertySignature",
5303+
"name": "--no-color",
5304+
"value": "\"\"",
5305+
"description": "Disable color output.",
5306+
"isOptional": true,
5307+
"environmentValue": "SHOPIFY_FLAG_NO_COLOR"
5308+
},
5309+
{
5310+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5311+
"syntaxKind": "PropertySignature",
5312+
"name": "--password <value>",
5313+
"value": "string",
5314+
"description": "Password generated from the Theme Access app.",
5315+
"isOptional": true,
5316+
"environmentValue": "SHOPIFY_CLI_THEME_TOKEN"
5317+
},
5318+
{
5319+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5320+
"syntaxKind": "PropertySignature",
5321+
"name": "--verbose",
5322+
"value": "\"\"",
5323+
"description": "Increase the verbosity of the output.",
5324+
"isOptional": true,
5325+
"environmentValue": "SHOPIFY_FLAG_VERBOSE"
5326+
},
5327+
{
5328+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5329+
"syntaxKind": "PropertySignature",
5330+
"name": "-e, --environment <value>",
5331+
"value": "string",
5332+
"description": "The environment to apply to the current command.",
5333+
"isOptional": true,
5334+
"environmentValue": "SHOPIFY_FLAG_ENVIRONMENT"
5335+
},
5336+
{
5337+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5338+
"syntaxKind": "PropertySignature",
5339+
"name": "-f, --force",
5340+
"value": "\"\"",
5341+
"description": "Force the duplicate operation to run without prompts or confirmations.",
5342+
"isOptional": true,
5343+
"environmentValue": "SHOPIFY_FLAG_FORCE"
5344+
},
5345+
{
5346+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5347+
"syntaxKind": "PropertySignature",
5348+
"name": "-j, --json",
5349+
"value": "\"\"",
5350+
"description": "Output the result as JSON.",
5351+
"isOptional": true,
5352+
"environmentValue": "SHOPIFY_FLAG_JSON"
5353+
},
5354+
{
5355+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5356+
"syntaxKind": "PropertySignature",
5357+
"name": "-n, --name <value>",
5358+
"value": "string",
5359+
"description": "Name of the newly duplicated theme.",
5360+
"isOptional": true,
5361+
"environmentValue": "SHOPIFY_FLAG_NAME"
5362+
},
5363+
{
5364+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5365+
"syntaxKind": "PropertySignature",
5366+
"name": "-s, --store <value>",
5367+
"value": "string",
5368+
"description": "Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",
5369+
"isOptional": true,
5370+
"environmentValue": "SHOPIFY_FLAG_STORE"
5371+
},
5372+
{
5373+
"filePath": "docs-shopify.dev/commands/interfaces/theme-duplicate.interface.ts",
5374+
"syntaxKind": "PropertySignature",
5375+
"name": "-t, --theme <value>",
5376+
"value": "string",
5377+
"description": "Theme ID or name of the remote theme.",
5378+
"isOptional": true,
5379+
"environmentValue": "SHOPIFY_FLAG_THEME_ID"
5380+
}
5381+
],
5382+
"value": "export interface themeduplicate {\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Force the duplicate operation to run without prompts or confirmations.\n * @environment SHOPIFY_FLAG_FORCE\n */\n '-f, --force'?: ''\n\n /**\n * Output the result as JSON.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Name of the newly duplicated theme.\n * @environment SHOPIFY_FLAG_NAME\n */\n '-n, --name <value>'?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <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}"
5383+
}
5384+
}
5385+
}
5386+
],
5387+
"category": "theme",
5388+
"related": []
5389+
},
52715390
{
52725391
"name": "theme info",
52735392
"description": "Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.",

0 commit comments

Comments
 (0)