mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Update master to work with multiple Vercel projects (#237)
* Moved configs * Delete with-config.js * Added log for configs * Update TS config based on the selected provider * set tsconfig to bigcommerce * Updated readme instructions on provider config * Added new commerce variable * Change the default of updateTSConfig Co-authored-by: B <curciobelen@gmail.com>
This commit is contained in:
21
README.md
21
README.md
@@ -71,25 +71,7 @@ Next.js Commerce provides a set of utilities and functions to create new provide
|
||||
|
||||
### How to change providers
|
||||
|
||||
First, update the provider selected in `commerce.config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"provider": "bigcommerce",
|
||||
"features": {
|
||||
"wishlist": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then, change the paths defined in `tsconfig.json` and update the `@framework` paths to point to the right folder provider:
|
||||
|
||||
```json
|
||||
"@framework": ["framework/bigcommerce"],
|
||||
"@framework/*": ["framework/bigcommerce/*"]
|
||||
```
|
||||
|
||||
Make sure to add the environment variables required by the new provider.
|
||||
Open `.env.local` and change the value of `COMMERCE_PROVIDER` to the provider you would like to use, then set the environment variables for that provider (use `.env.template` as the base).
|
||||
|
||||
### Features
|
||||
|
||||
@@ -103,7 +85,6 @@ Every provider defines the features that it supports under `framework/{provider}
|
||||
- You'll see a config file like this:
|
||||
```json
|
||||
{
|
||||
"provider": "bigcommerce",
|
||||
"features": {
|
||||
"wishlist": false
|
||||
}
|
||||
|
Reference in New Issue
Block a user