Skip to content

Commit

Permalink
* Rename --stable to --legacy
Browse files Browse the repository at this point in the history
 * Add info banner in the new `shopify theme dev` command (mentioning the --legacy flag)
 * Update docs
  • Loading branch information
karreiro committed Sep 16, 2024
1 parent 56c5b46 commit 2b06d21
Show file tree
Hide file tree
Showing 20 changed files with 120 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .changeset/pretty-olives-promise.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
'@shopify/cli': minor
---

Default to Typescript implementation for theme commands. Legacy implementation is stil available via the `--stable` flag.
Default to Typescript implementation for theme commands. Legacy implementation is stil available via the `--legacy` flag.
6 changes: 0 additions & 6 deletions docs-shopify.dev/commands/interfaces/app-dev.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ export interface appdev {
*/
'--skip-dependencies-installation'?: ''

/**
* Use the legacy Ruby implementation for managing theme app extensions.
* @environment SHOPIFY_FLAG_STABLE
*/
'--stable'?: ''

/**
* Store URL. Must be an existing development or Shopify Plus sandbox store.
* @environment SHOPIFY_FLAG_STORE
Expand Down
6 changes: 0 additions & 6 deletions docs-shopify.dev/commands/interfaces/app-logs.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ export interface applogs {
*/
'--source <value>'?: string

/**
* Use the legacy Ruby implementation for managing theme app extensions.
* @environment SHOPIFY_FLAG_STABLE
*/
'--stable'?: ''

/**
* Filters output to the specified status (success or failure).
* @environment SHOPIFY_FLAG_STATUS
Expand Down
12 changes: 0 additions & 12 deletions docs-shopify.dev/commands/interfaces/theme-console.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ export interface themeconsole {
*/
'--password <value>'?: string

/**
* Local port to serve authentication service.
* @environment SHOPIFY_FLAG_PORT
*/
'--port <value>'?: string

/**
* Use the legacy Ruby implementation for the `theme console` command.
* @environment SHOPIFY_FLAG_STABLE
*/
'--stable'?: ''

/**
* Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).
* @environment SHOPIFY_FLAG_STORE
Expand Down
12 changes: 0 additions & 12 deletions docs-shopify.dev/commands/interfaces/theme-dev.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,12 @@ export interface themedev {
*/
'--path <value>'?: string

/**
* Force polling to detect file changes.
* @environment SHOPIFY_FLAG_POLL
*/
'--poll'?: ''

/**
* Local port to serve theme preview from.
* @environment SHOPIFY_FLAG_PORT
*/
'--port <value>'?: string

/**
* Use the legacy Ruby implementation for the `theme dev` command.
* @environment SHOPIFY_FLAG_STABLE
*/
'--stable'?: ''

/**
* Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).
* @environment SHOPIFY_FLAG_STORE
Expand Down
62 changes: 4 additions & 58 deletions docs-shopify.dev/generated/generated_docs_data.json

Large diffs are not rendered by default.

31 changes: 0 additions & 31 deletions docs-shopify.dev/generated/generated_static_pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,6 @@
]
}
},
{
"type": "Generic",
"anchorLink": "requirements-themes",
"title": "Requirements for themes",
"sectionContent": "\nTo work with themes, your system must meet the following additional requirements:\n- [Ruby](https://www.ruby-lang.org/en/) version 2.7.5 or higher\n\n> Note: Theme requirements are automatically installed on macOS when you use Homebrew to install Shopify CLI.\n",
"codeblock": {
"title": "Installation requirements for themes",
"tabs": [
{
"title": "macOS: brew",
"code": "brew install ruby\n",
"language": "bash"
},
{
"title": "Windows",
"code": "Install Ruby+Devkit 3.0 using https://rubyinstaller.org/downloads/\n\nSelect the MSYS2 component and the MSYS2 base installation option\n",
"language": "bash"
},
{
"title": "Linux: apt",
"code": "\nsudo apt update && sudo apt upgrade\n\nsudo apt install curl gcc g++ make\n\nsudo apt install ruby-full\n\nsudo apt install ruby-dev\n# Ruby development environment\n\nsudo apt install git\n",
"language": "bash"
},
{
"title": "Linux: yum",
"code": "sudo yum install curl\n\nsudo yum group install \"Development Tools\"\n# Includes GCC, g++, and Make\n\nsudo yum install ruby\nsudo yum install ruby-devel\n# Ruby development environment\n\nsudo yum install git\n",
"language": "bash"
}
]
}
},
{
"type": "Generic",
"anchorLink": "commands",
Expand Down
36 changes: 0 additions & 36 deletions docs-shopify.dev/static/cli.doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,6 @@ const data: LandingTemplateSchema = {
],
},
},
{
type: 'Generic',
anchorLink: 'requirements-themes',
title: 'Requirements for themes',
sectionContent: `
To work with themes, your system must meet the following additional requirements:
- [Ruby](https://www.ruby-lang.org/en/) version 2.7.5 or higher
> Note: Theme requirements are automatically installed on macOS when you use Homebrew to install Shopify CLI.
`,
codeblock: {
title: 'Installation requirements for themes',
tabs: [
{
title: 'macOS: brew',
code: 'examples/requirements.brew.example.sh',
language: 'bash',
},
{
title: 'Windows',
code: 'examples/requirements.win.example.sh',
language: 'bash',
},
{
title: 'Linux: apt',
code: 'examples/requirements.apt.example.sh',
language: 'bash',
},
{
title: 'Linux: yum',
code: 'examples/requirements.yum.example.sh',
language: 'bash',
},
],
},
},
{
type: 'Generic',
anchorLink: 'commands',
Expand Down
7 changes: 4 additions & 3 deletions packages/app/src/cli/commands/app/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ If you're using the PHP or Ruby app template, then you need to complete the foll
'Key used to authenticate GraphiQL requests. Should be specified if exposing GraphiQL on a publicly accessible URL. By default, no key is required.',
env: 'SHOPIFY_FLAG_GRAPHIQL_KEY',
}),
stable: Flags.boolean({
legacy: Flags.boolean({
hidden: true,
description: 'Use the legacy Ruby implementation for managing theme app extensions.',
env: 'SHOPIFY_FLAG_STABLE',
env: 'SHOPIFY_FLAG_LEGACY',
}),
}

Expand Down Expand Up @@ -182,7 +183,7 @@ If you're using the PHP or Ruby app template, then you need to complete the foll
notify: flags.notify,
graphiqlPort: flags['graphiql-port'],
graphiqlKey: flags['graphiql-key'],
devPreview: !flags.stable,
devPreview: !flags.legacy,
}

await dev(devOptions)
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/cli/commands/app/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class Logs extends Command {
'no-tunnel': Dev.flags['no-tunnel'],
'graphiql-port': Dev.flags['graphiql-port'],
'graphiql-key': Dev.flags['graphiql-key'],
stable: Dev.flags.stable,
stable: Dev.flags.legacy,
source: Flags.string({
description: 'Filters output to the specified log source.',
env: 'SHOPIFY_FLAG_SOURCE',
Expand Down
22 changes: 6 additions & 16 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ Run the app.
```
USAGE
$ shopify app dev [--checkout-cart-url <value>] [--client-id <value> | -c <value>] [--no-color]
[--no-update] [--notify <value>] [--path <value>] [--reset | ] [--skip-dependencies-installation] [--stable] [-s
<value>] [--subscription-product-url <value>] [-t <value>] [--theme-app-extension-port <value>] [--tunnel-url
<value> | | ] [--verbose]
[--no-update] [--notify <value>] [--path <value>] [--reset | ] [--skip-dependencies-installation] [-s <value>]
[--subscription-product-url <value>] [-t <value>] [--theme-app-extension-port <value>] [--tunnel-url <value> | | ]
[--verbose]
FLAGS
-c, --config=<value> The name of the app configuration.
Expand All @@ -221,7 +221,6 @@ FLAGS
--path=<value> The path to your app directory.
--reset Reset all your settings.
--skip-dependencies-installation Skips the installation of dependencies. Deprecated, use workspaces instead.
--stable Use the legacy Ruby implementation for managing theme app extensions.
--subscription-product-url=<value> Resource URL for subscription UI extension. Format: "/products/{productId}"
--theme-app-extension-port=<value> Local port of the theme app extension development server.
--tunnel-url=<value> Use a custom tunnel, it must be running before executing dev. Format:
Expand Down Expand Up @@ -548,7 +547,7 @@ Stream detailed logs for your Shopify app.
```
USAGE
$ shopify app logs [--client-id <value> | -c <value>] [-j] [--no-color] [--path <value>] [--reset | ]
[--source <value>] [--stable] [--status success|failure] [-s <value>] [--verbose]
[--source <value>] [--status success|failure] [-s <value>] [--verbose]
FLAGS
-c, --config=<value> The name of the app configuration.
Expand All @@ -559,7 +558,6 @@ FLAGS
--path=<value> The path to your app directory.
--reset Reset all your settings.
--source=<value>... Filters output to the specified log source.
--stable Use the legacy Ruby implementation for managing theme app extensions.
--status=<option> Filters output to the specified status (success or failure).
<options: success|failure>
--verbose Increase the verbosity of the output.
Expand Down Expand Up @@ -1712,8 +1710,6 @@ FLAGS
(example.myshopify.com, https://example.myshopify.com).
--no-color Disable color output.
--password=<value> Password generated from the Theme Access app.
--port=<value> Local port to serve authentication service.
--stable Use the legacy Ruby implementation for the `theme console` command.
--store-password=<value> The password for storefronts with password protection.
--url=<value> [default: /] The url to be used as context
--verbose Increase the verbosity of the output.
Expand Down Expand Up @@ -1767,8 +1763,8 @@ Uploads the current theme as a development theme to the connected store, then pr
```
USAGE
$ shopify theme dev [-e <value>] [--host <value>] [-x <value>] [--live-reload hot-reload|full-page|off]
[--no-color] [-n] [--notify <value>] [-o <value>] [--open] [--password <value>] [--path <value>] [--poll] [--port
<value>] [--stable] [-s <value>] [--store-password <value>] [-t <value>] [--theme-editor-sync] [--verbose]
[--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]
FLAGS
-e, --environment=<value>
Expand Down Expand Up @@ -1817,15 +1813,9 @@ FLAGS
--path=<value>
The path to your theme directory.
--poll
Force polling to detect file changes.
--port=<value>
Local port to serve theme preview from.
--stable
Use the legacy Ruby implementation for the `theme dev` command.
--store-password=<value>
The password for storefronts with password protection.
Expand Down
Loading

0 comments on commit 2b06d21

Please sign in to comment.