theme-extension
Build, test, and deploy theme extensions. Alias: te.
In a terminal, create, build, connect and serve ask for required flags you leave off (connect lets you pick the app, serve the theme). With --no-input, in CI, or when stdin or stderr is not a terminal, a missing flag fails fast instead.
create
Scaffold a new standalone theme extension project in the current directory (local, no network). Its config is written to extension.config.json.
shoplazza theme-extension create [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--name <name> | string | Project name / target directory (required) |
--type <type> | string | Template type: basic or embed (required) |
serve
Register (on first run), push a dev build, and start incremental sync with file watching on theme-app/, against the current store. Prints the Admin and Storefront preview URLs and runs until interrupted.
shoplazza theme-extension serve [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--theme-id, -t <THEME_ID> | string | Theme to preview the extension on (required) |
--path <path> | string | Project path (default: current directory) |
build
Build a new theme-extension version (zip, upload, and create the version on the server). The zip is made from theme-app/ and leaves out files at its top level other than assets-manifest.json, dot entries at any depth (.env, .gitignore, .DS_Store, .git/) and node_modules/.
shoplazza theme-extension build [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--version <version> | string | New semver version in X.Y.Z form, e.g. 1.0.0, greater than the latest version (required) |
--description <text> | string | Version description (required) |
--store-domain, -s <domain> | string | Target store (defaults to current store) |
--path <path> | string | Project path (default: current directory) |
deploy
Enable a version in the current store.
shoplazza theme-extension deploy [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--version <version> | string | Version to enable, e.g. 1.0.0 (defaults to the version recorded by te build) |
--path <path> | string | Project path (default: current directory) |
--debug | bool | Print the raw publish request/response for troubleshooting |
connect
Link this theme extension to an app. The app's partner is derived from --client-id.
shoplazza theme-extension connect [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--client-id <id> | string | App client_id to link (required) |
--path <path> | string | Project path (default: current directory) |
release
Publish a version in the bound app.
shoplazza theme-extension release [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--version <version> | string | Version to publish, e.g. 1.0.0 (defaults to the version recorded by te build) |
--path <path> | string | Project path (default: current directory) |
--debug | bool | Print the resolved publish request for troubleshooting |
list
List the store's theme extensions.
shoplazza theme-extension list [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--store-domain, -s <domain> | string | Target store (defaults to current store) |
versions
List the versions of the project's theme extension (its id is read from extension.config.json) on the current store.
shoplazza theme-extension versions [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--path <path> | string | Project path (default: current directory) |