diff --git a/docs-shopify.dev/commands/examples/theme-generate-block.example.sh b/docs-shopify.dev/commands/examples/theme-generate-block.example.sh new file mode 100644 index 00000000000..92daedf977e --- /dev/null +++ b/docs-shopify.dev/commands/examples/theme-generate-block.example.sh @@ -0,0 +1 @@ +shopify theme generate block [flags] \ No newline at end of file diff --git a/docs-shopify.dev/commands/examples/theme-generate-section.example.sh b/docs-shopify.dev/commands/examples/theme-generate-section.example.sh new file mode 100644 index 00000000000..e4615266d96 --- /dev/null +++ b/docs-shopify.dev/commands/examples/theme-generate-section.example.sh @@ -0,0 +1 @@ +shopify theme generate section [flags] \ No newline at end of file diff --git a/docs-shopify.dev/commands/examples/theme-generate-template.example.sh b/docs-shopify.dev/commands/examples/theme-generate-template.example.sh new file mode 100644 index 00000000000..2c6a5bd1c35 --- /dev/null +++ b/docs-shopify.dev/commands/examples/theme-generate-template.example.sh @@ -0,0 +1 @@ +shopify theme generate template [flags] \ No newline at end of file diff --git a/docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts b/docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts new file mode 100644 index 00000000000..4da2b198cc3 --- /dev/null +++ b/docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts @@ -0,0 +1,32 @@ +// This is an autogenerated file. Don't edit this file manually. +export interface themegenerateblock { + /** + * Name of the block + * @environment SHOPIFY_FLAG_BLOCK_NAME + */ + '-n, --name '?: string + + /** + * Disable color output. + * @environment SHOPIFY_FLAG_NO_COLOR + */ + '--no-color'?: '' + + /** + * The path to your theme directory. + * @environment SHOPIFY_FLAG_PATH + */ + '--path '?: string + + /** + * Type of block to generate + * @environment SHOPIFY_FLAG_BLOCK_TYPE + */ + '-t, --type '?: string + + /** + * Increase the verbosity of the output. + * @environment SHOPIFY_FLAG_VERBOSE + */ + '--verbose'?: '' +} diff --git a/docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts b/docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts new file mode 100644 index 00000000000..5788d126256 --- /dev/null +++ b/docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts @@ -0,0 +1,32 @@ +// This is an autogenerated file. Don't edit this file manually. +export interface themegeneratesection { + /** + * Name of the section + * @environment SHOPIFY_FLAG_SECTION_NAME + */ + '-n, --name '?: string + + /** + * Disable color output. + * @environment SHOPIFY_FLAG_NO_COLOR + */ + '--no-color'?: '' + + /** + * The path to your theme directory. + * @environment SHOPIFY_FLAG_PATH + */ + '--path '?: string + + /** + * Type of section to generate + * @environment SHOPIFY_FLAG_SECTION_TYPE + */ + '-t, --type '?: string + + /** + * Increase the verbosity of the output. + * @environment SHOPIFY_FLAG_VERBOSE + */ + '--verbose'?: '' +} diff --git a/docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts b/docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts new file mode 100644 index 00000000000..e2f28c642f3 --- /dev/null +++ b/docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts @@ -0,0 +1,32 @@ +// This is an autogenerated file. Don't edit this file manually. +export interface themegeneratetemplate { + /** + * Name of the template + * @environment SHOPIFY_FLAG_TEMPLATE_NAME + */ + '-n, --name '?: string + + /** + * Disable color output. + * @environment SHOPIFY_FLAG_NO_COLOR + */ + '--no-color'?: '' + + /** + * The path to your theme directory. + * @environment SHOPIFY_FLAG_PATH + */ + '--path '?: string + + /** + * Type of template to generate + * @environment SHOPIFY_FLAG_TEMPLATE_TYPE + */ + '-t, --type '?: string + + /** + * Increase the verbosity of the output. + * @environment SHOPIFY_FLAG_VERBOSE + */ + '--verbose'?: '' +} diff --git a/docs-shopify.dev/commands/theme-generate-block.doc.ts b/docs-shopify.dev/commands/theme-generate-block.doc.ts new file mode 100644 index 00000000000..ad4dc48309f --- /dev/null +++ b/docs-shopify.dev/commands/theme-generate-block.doc.ts @@ -0,0 +1,38 @@ +// This is an autogenerated file. Don't edit this file manually. +import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs' + +const data: ReferenceEntityTemplateSchema = { + name: 'theme generate block', + description: `Creates a new [theme block](/docs/themes/architecture/blocks) in your local theme directory. + + The block is created in the \`blocks\` directory with the basic structure needed, including schema and settings. + + You can specify the type of block to generate using the \`--type\` flag. The block will be created with appropriate default settings based on the type.`, + overviewPreviewDescription: `Creates and adds a new block file to your local theme directory`, + type: 'command', + isVisualComponent: false, + defaultExample: { + codeblock: { + tabs: [ + { + title: 'theme generate block', + code: './examples/theme-generate-block.example.sh', + language: 'bash', + }, + ], + title: 'theme generate block', + }, + }, + definitions: [ + { + title: 'Flags', + description: 'The following flags are available for the `theme generate block` command:', + type: 'themegenerateblock', + }, + ], + category: 'theme', + related: [ + ], +} + +export default data \ No newline at end of file diff --git a/docs-shopify.dev/commands/theme-generate-section.doc.ts b/docs-shopify.dev/commands/theme-generate-section.doc.ts new file mode 100644 index 00000000000..dab5b723ef8 --- /dev/null +++ b/docs-shopify.dev/commands/theme-generate-section.doc.ts @@ -0,0 +1,38 @@ +// This is an autogenerated file. Don't edit this file manually. +import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs' + +const data: ReferenceEntityTemplateSchema = { + name: 'theme generate section', + description: `Creates a new [theme section](/docs/themes/architecture/sections) in your local theme directory. + + The section is created in the \`sections\` directory with the basic structure needed, including schema, settings, and blocks. + + You can specify the type of section to generate using the \`--type\` flag. The section will be created with appropriate default settings and blocks based on the type.`, + overviewPreviewDescription: `Creates and adds a new section file to your local theme directory`, + type: 'command', + isVisualComponent: false, + defaultExample: { + codeblock: { + tabs: [ + { + title: 'theme generate section', + code: './examples/theme-generate-section.example.sh', + language: 'bash', + }, + ], + title: 'theme generate section', + }, + }, + definitions: [ + { + title: 'Flags', + description: 'The following flags are available for the `theme generate section` command:', + type: 'themegeneratesection', + }, + ], + category: 'theme', + related: [ + ], +} + +export default data \ No newline at end of file diff --git a/docs-shopify.dev/commands/theme-generate-template.doc.ts b/docs-shopify.dev/commands/theme-generate-template.doc.ts new file mode 100644 index 00000000000..26a593e5f7c --- /dev/null +++ b/docs-shopify.dev/commands/theme-generate-template.doc.ts @@ -0,0 +1,38 @@ +// This is an autogenerated file. Don't edit this file manually. +import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs' + +const data: ReferenceEntityTemplateSchema = { + name: 'theme generate template', + description: `Creates a new [theme template](/docs/themes/architecture/templates) in your local theme directory. + + The template is created in the \`templates\` directory with the basic structure needed, including layout and content sections. + + You can specify the type of template to generate using the \`--type\` flag. The template will be created with appropriate default sections based on the type.`, + overviewPreviewDescription: `Creates and adds a new template file to your local theme directory`, + type: 'command', + isVisualComponent: false, + defaultExample: { + codeblock: { + tabs: [ + { + title: 'theme generate template', + code: './examples/theme-generate-template.example.sh', + language: 'bash', + }, + ], + title: 'theme generate template', + }, + }, + definitions: [ + { + title: 'Flags', + description: 'The following flags are available for the `theme generate template` command:', + type: 'themegeneratetemplate', + }, + ], + category: 'theme', + related: [ + ], +} + +export default data \ No newline at end of file diff --git a/docs-shopify.dev/generated/generated_docs_data.json b/docs-shopify.dev/generated/generated_docs_data.json index 3abf5db2753..71098b2ea14 100644 --- a/docs-shopify.dev/generated/generated_docs_data.json +++ b/docs-shopify.dev/generated/generated_docs_data.json @@ -5162,6 +5162,255 @@ "category": "theme", "related": [] }, + { + "name": "theme generate block", + "description": "Creates a new [theme block](/docs/themes/architecture/blocks) in your local theme directory.\n\n The block is created in the `blocks` directory with the basic structure needed, including schema and settings.\n\n You can specify the type of block to generate using the `--type` flag. The block will be created with appropriate default settings based on the type.", + "overviewPreviewDescription": "Creates and adds a new block file to your local theme directory", + "type": "command", + "isVisualComponent": false, + "defaultExample": { + "codeblock": { + "tabs": [ + { + "title": "theme generate block", + "code": "shopify theme generate block [flags]", + "language": "bash" + } + ], + "title": "theme generate block" + } + }, + "definitions": [ + { + "title": "Flags", + "description": "The following flags are available for the `theme generate block` command:", + "type": "themegenerateblock", + "typeDefinitions": { + "themegenerateblock": { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts", + "name": "themegenerateblock", + "description": "", + "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--no-color", + "value": "\"\"", + "description": "Disable color output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_NO_COLOR" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--path ", + "value": "string", + "description": "The path to your theme directory.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_PATH" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--verbose", + "value": "\"\"", + "description": "Increase the verbosity of the output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_VERBOSE" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-n, --name ", + "value": "string", + "description": "Name of the block", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_BLOCK_NAME" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-block.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-t, --type ", + "value": "string", + "description": "Type of block to generate", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_BLOCK_TYPE" + } + ], + "value": "export interface themegenerateblock {\n /**\n * Name of the block\n * @environment SHOPIFY_FLAG_BLOCK_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The path to your theme directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Type of block to generate\n * @environment SHOPIFY_FLAG_BLOCK_TYPE\n */\n '-t, --type '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + } + } + } + ], + "category": "theme", + "related": [] + }, + { + "name": "theme generate section", + "description": "Creates a new [theme section](/docs/themes/architecture/sections) in your local theme directory.\n\n The section is created in the `sections` directory with the basic structure needed, including schema, settings, and blocks.\n\n You can specify the type of section to generate using the `--type` flag. The section will be created with appropriate default settings and blocks based on the type.", + "overviewPreviewDescription": "Creates and adds a new section file to your local theme directory", + "type": "command", + "isVisualComponent": false, + "defaultExample": { + "codeblock": { + "tabs": [ + { + "title": "theme generate section", + "code": "shopify theme generate section [flags]", + "language": "bash" + } + ], + "title": "theme generate section" + } + }, + "definitions": [ + { + "title": "Flags", + "description": "The following flags are available for the `theme generate section` command:", + "type": "themegeneratesection", + "typeDefinitions": { + "themegeneratesection": { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts", + "name": "themegeneratesection", + "description": "", + "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--no-color", + "value": "\"\"", + "description": "Disable color output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_NO_COLOR" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--path ", + "value": "string", + "description": "The path to your theme directory.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_PATH" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--verbose", + "value": "\"\"", + "description": "Increase the verbosity of the output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_VERBOSE" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-n, --name ", + "value": "string", + "description": "Name of the section", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_SECTION_NAME" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-section.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-t, --type ", + "value": "string", + "description": "Type of section to generate", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_SECTION_TYPE" + } + ], + "value": "export interface themegeneratesection {\n /**\n * Name of the section\n * @environment SHOPIFY_FLAG_SECTION_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The path to your theme directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Type of section to generate\n * @environment SHOPIFY_FLAG_SECTION_TYPE\n */\n '-t, --type '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + } + } + } + ], + "category": "theme", + "related": [] + }, + { + "name": "theme generate template", + "description": "Creates a new [theme template](/docs/themes/architecture/templates) in your local theme directory.\n\n The template is created in the `templates` directory with the basic structure needed, including layout and content sections.\n\n You can specify the type of template to generate using the `--type` flag. The template will be created with appropriate default sections based on the type.", + "overviewPreviewDescription": "Creates and adds a new template file to your local theme directory", + "type": "command", + "isVisualComponent": false, + "defaultExample": { + "codeblock": { + "tabs": [ + { + "title": "theme generate template", + "code": "shopify theme generate template [flags]", + "language": "bash" + } + ], + "title": "theme generate template" + } + }, + "definitions": [ + { + "title": "Flags", + "description": "The following flags are available for the `theme generate template` command:", + "type": "themegeneratetemplate", + "typeDefinitions": { + "themegeneratetemplate": { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts", + "name": "themegeneratetemplate", + "description": "", + "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--no-color", + "value": "\"\"", + "description": "Disable color output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_NO_COLOR" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--path ", + "value": "string", + "description": "The path to your theme directory.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_PATH" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--verbose", + "value": "\"\"", + "description": "Increase the verbosity of the output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_VERBOSE" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-n, --name ", + "value": "string", + "description": "Name of the template", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_TEMPLATE_NAME" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/theme-generate-template.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-t, --type ", + "value": "string", + "description": "Type of template to generate", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_TEMPLATE_TYPE" + } + ], + "value": "export interface themegeneratetemplate {\n /**\n * Name of the template\n * @environment SHOPIFY_FLAG_TEMPLATE_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The path to your theme directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Type of template to generate\n * @environment SHOPIFY_FLAG_TEMPLATE_TYPE\n */\n '-t, --type '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + } + } + } + ], + "category": "theme", + "related": [] + }, { "name": "theme info", "description": "Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.", diff --git a/packages/cli/README.md b/packages/cli/README.md index c9c7b72b2bb..7b071557cf4 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -66,6 +66,9 @@ * [`shopify theme console`](#shopify-theme-console) * [`shopify theme delete`](#shopify-theme-delete) * [`shopify theme dev`](#shopify-theme-dev) +* [`shopify theme generate block`](#shopify-theme-generate-block) +* [`shopify theme generate section`](#shopify-theme-generate-section) +* [`shopify theme generate template`](#shopify-theme-generate-template) * [`shopify theme info`](#shopify-theme-info) * [`shopify theme init [name]`](#shopify-theme-init-name) * [`shopify theme language-server`](#shopify-theme-language-server) @@ -1895,6 +1898,92 @@ DESCRIPTION (https://shopify.dev/docs/themes/tools/cli#directory-structure). ``` +## `shopify theme generate block` + +Creates and adds a new block file to your local theme directory + +``` +USAGE + $ shopify theme generate block [-n ] [--no-color] [--path ] [-t text|image|video|product|collection] + [--verbose] + +FLAGS + -n, --name= Name of the block + -t, --type=