Shopify / cli

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

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

Open zirkelc opened 4 months ago

zirkelc commented 4 months 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 4 months ago

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

@nickwesselman what do you think?

github-actions[bot] commented 2 months ago

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

zirkelc commented 2 months ago

Hi @gonzaloriestra

did you have a chance to look at this? I could work on a small PR to implement this feature, if your team agrees on implementing this in general.

nickwesselman commented 1 month ago

Hi @zirkelc -- This sounds reasonable, we'd accept a PR for this one!