Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/polite-eyes-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@shopify/cli-kit': patch
'@shopify/theme': patch
'@shopify/cli': patch
---

Add --listing flag to theme dev, push, and share commands
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface themedev {
* Controls the visibility of the error overlay when an theme asset upload fails:
- silent Prevents the error overlay from appearing.
- default Displays the error overlay.

* @environment SHOPIFY_FLAG_ERROR_OVERLAY
*/
'--error-overlay <value>'?: string
Expand All @@ -27,6 +27,12 @@ export interface themedev {
*/
'-x, --ignore <value>'?: string

/**
* The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.
* @environment SHOPIFY_FLAG_LISTING
*/
'--listing <value>'?: string

/**
* The live reload mode switches the server behavior when a file is modified:
- hot-reload Hot reloads local changes to CSS and sections (default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export interface themepush {
*/
'-j, --json'?: ''

/**
* The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.
* @environment SHOPIFY_FLAG_LISTING
*/
'--listing <value>'?: string

/**
* Push theme files from your remote live theme.
* @environment SHOPIFY_FLAG_LIVE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export interface themeshare {
*/
'-e, --environment <value>'?: string

/**
* The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.
* @environment SHOPIFY_FLAG_LISTING
*/
'--listing <value>'?: string

/**
* Disable color output.
* @environment SHOPIFY_FLAG_NO_COLOR
Expand Down
35 changes: 31 additions & 4 deletions docs-shopify.dev/generated/generated_docs_data.json

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion packages/cli-kit/src/public/common/string.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {takeRandomFromArray} from './array.js'
import {unstyled} from '../../public/node/output.js'
import {Token, TokenItem} from '../../private/node/ui/components/TokenizedText.js'
import {camelCase, constantCase, paramCase, snakeCase, pascalCase} from 'change-case'
import {camelCase, capitalCase, constantCase, paramCase, snakeCase, pascalCase} from 'change-case'

const SAFE_RANDOM_BUSINESS_ADJECTIVES = [
'commercial',
Expand Down Expand Up @@ -307,6 +307,16 @@ export function camelize(input: string): string {
return camelCase(input)
}

/**
* Transform a string to capitalCase.
*
* @param input - String to transform.
* @returns The transformed string.
*/
export function capitalizeWords(input: string): string {
return capitalCase(input)
}

/**
* Transform a string to param-case.
*
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-kit/src/public/node/themes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ export type ThemeFSEventPayload<T extends ThemeFSEventName = 'add'> = (ThemeFSEv

export interface ThemeFileSystemOptions {
filters?: {ignore?: string[]; only?: string[]}
notify?: string
listing?: string
noDelete?: boolean
notify?: string
}

/**
Expand Down
14 changes: 11 additions & 3 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1804,8 +1804,8 @@ Uploads the current theme as a development theme to the connected store, then pr

```
USAGE
$ shopify theme dev [-e <value>...] [--error-overlay silent|default] [--host <value>] [-x <value>...]
[--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>...] [--open] [--password
$ shopify theme dev [-e <value>...] [--error-overlay silent|default] [--host <value>] [-x <value>...] [--listing
<value>] [--live-reload hot-reload|full-page|off] [--no-color] [-n] [--notify <value>] [-o <value>...] [--open] [--password
<value>] [--path <value>] [--port <value>] [-s <value>] [--store-password <value>] [-t <value>]
[--theme-editor-sync] [--verbose]

Expand Down Expand Up @@ -1840,6 +1840,10 @@ FLAGS
--host=<value>
Set which network interface the web server listens on. The default value is 127.0.0.1.

--listing=<value>
The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name]
directory.

--live-reload=<option>
[default: hot-reload] The live reload mode switches the server behavior when a file is modified:
- hot-reload Hot reloads local changes to CSS and sections (default)
Expand Down Expand Up @@ -2289,6 +2293,8 @@ FLAGS
-u, --unpublished Create a new unpublished theme and push to it.
-x, --ignore=<value>... Skip uploading the specified files (Multiple flags allowed). Wrap the value in double
quotes if you're using wildcards.
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
listings/[preset-name] directory.
--no-color Disable color output.
--password=<value> Password generated from the Theme Access app.
--path=<value> The path where you want to run the command. Defaults to the current working directory.
Expand Down Expand Up @@ -2369,13 +2375,15 @@ Creates a shareable, unpublished, and new theme on your theme library with a ran

```
USAGE
$ shopify theme share [-e <value>...] [--no-color] [--password <value>] [--path <value>] [-s <value>]
$ shopify theme share [-e <value>...] [--listing <value>] [--no-color] [--password <value>] [--path <value>] [-s <value>]
[--verbose]

FLAGS
-e, --environment=<value>... The environment to apply to the current command.
-s, --store=<value> Store URL. It can be the store prefix (example) or the full myshopify.com URL
(example.myshopify.com, https://example.myshopify.com).
--listing=<value> The listing preset to use for multi-preset themes. Applies preset files from
listings/[preset-name] directory.
--no-color Disable color output.
--password=<value> Password generated from the Theme Access app.
--path=<value> The path where you want to run the command. Defaults to the current working directory.
Expand Down
Loading