Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
379 stars 112 forks source link

[Feature]: allows configs in sub-directories #4021

Open zirkelc opened 4 weeks ago

zirkelc commented 4 weeks ago

What area(s) will this request affect?

App, Deployment

What type of change do you want to see?

New feature

Overview

Allow to specific the config by path for apps with multiple configs:

# uses shopify.app.test.toml
shopify app deploy --config test

# uses ./config/shopify.app.test.toml
shopify app deploy --config ./config/shopify.app.test.toml

Motivation

I have an app with multiple different configs for custom apps to test new features. Currently, all configs must be in the app directory and are identified by their config name in shopify.app.<config-name>.toml

/my-shopify-app
├── /app
│   ├── root.tsx
├── package.json
├── tsconfig.json
├── shopify.app.<config-name>.toml

I would like to move all configs into a sub-directory like /config or even /config/dev/

/my-shopify-app
├── /app
│   ├── root.tsx
├── /config
│   ├── shopify.app.<config-name>.toml
│   ├── /test
│   │   ├── shopify.app.<config-name>.toml
├── package.json
├── tsconfig.json
gonzaloriestra commented 6 days ago

Thanks for the suggestion! It makes sense to me and the implementation shouldn't be complex.

@nickwesselman what do you think?