bigcommerce / catalyst

Catalyst - for Composable Commerce
https://catalyst-demo.site
MIT License
120 stars 161 forks source link

feat(cli): add ability to pass arbitrary env vars to write in .env.local #1518

Closed matthewvolk closed 1 month ago

matthewvolk commented 1 month ago

What/Why?

Adds the ability to pass in arbitrary environment variables to the CLI

Testing

Running the following command:

pnpm create @bigcommerce/catalyst@latest --env HI=BYE --env BYE=HI

Results in the following .env.local in the project created by the create command:

# .env.local

# ...
# Other environment variables
# ...

HI=BYE
BYE=HI
changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 8c36e13f4203edc28a946c5434ed64ee2b072ea3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------------- | ----- | | @bigcommerce/create-catalyst | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 5:24pm
6 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **catalyst** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst/4iVcPNmA2qoxxUfgQjUB1n4XpvwV)) | | | Oct 29, 2024 5:24pm | | **catalyst-1millionproducts-store** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-1millionproducts-store/FMPFyK2J1qqVwCzN3ydm94bVtVtz)) | [Visit Preview](https://catalyst-1millionproducts-store-git-2e8ff6-bigcommerce-platform.vercel.app) | | Oct 29, 2024 5:24pm | | **catalyst-au** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-au/BbkyVCUnQi7RugSkFZjo7nEspfC4)) | [Visit Preview](https://catalyst-au-git-cli-arbitrary-env-bigcommerce-platform.vercel.app) | | Oct 29, 2024 5:24pm | | **catalyst-test-store** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-test-store/2pxZygJwWUeqKmEFBYdhaD5Zoj25)) | [Visit Preview](https://catalyst-test-store-git-cli-arbitrary-env-bigcommerce-platform.vercel.app) | | Oct 29, 2024 5:24pm | | **catalyst-uk** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-uk/7AU4Lt5LtzwM1qWq2kVzFPQfZ5HN)) | [Visit Preview](https://catalyst-uk-git-cli-arbitrary-env-bigcommerce-platform.vercel.app) | | Oct 29, 2024 5:24pm | | **catalyst-unstable** | ⬜️ Ignored ([Inspect](https://vercel.com/bigcommerce-platform/catalyst-unstable/Hp5ziKQXXm3tdFKqEeGkNoLmwYos)) | [Visit Preview](https://catalyst-unstable-git-cli-arbitrary-env-bigcommerce-platform.vercel.app) | | Oct 29, 2024 5:24pm |
chanceaclark commented 1 month ago

Could we also allow a comma separated list? e.g. --env FOO=BAR,BAZ=BUZZ?

matthewvolk commented 1 month ago

Could we also allow a comma separated list? e.g. --env FOO=BAR,BAZ=BUZZ?

Definitely possible, but not required for this PR IMO - happy to add later

github-actions[bot] commented 1 month ago

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-e9fr47sao-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟠 Performance 81
🟢 Accessibility 96
🟢 Best practices 100
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟠 Performance 88
🟢 Accessibility 96
🟢 Best practices 100
🟠 SEO 85