I’m asking this because I created an app that’s not a shopify cli app template. As a result, in cli 3.0, they deprecated the cli2.0 command for the theme app extension. It is not understandable how to use new commands according to the shopify documentation.
like cli 2.0 have these steps to create theme app extension.(take a look below image)
enter image description here
but in cli 3.0 description they removed all commands so now big question how to migrate or create theme app extension without using cli app templete.
I’m trying to explain how to migrate or create theme app extension in shopify without using shopify app templete. so expecting to get an answer around this.
2
Answers
I found it. Follow below steps:
Create
package.json
file at root of your project directory and copy content from shopify doc and pastenpm install
npm run shopify app generate extension
npm run deploy
To classify a directory as an extension, given directory must include a config file with a .toml extension. Quote from documentation:
If you’re migrating a theme app extension, then do the following:
Create a shopify.theme.extension.toml in the extension’s directory.
The TOML should contain the following information:
name: The name of your app extension. name should match the EXTENSION_TITLE from your extension’s .env file.
type: Enter theme.
shopify.theme.extension.toml :
Optional: delete any remaining .env, extension.config.yml, and .shopify-cli.yml files.