mirror of
https://github.com/vercel/commerce.git
synced 2025-03-31 17:25:53 +00:00
Updated the commerce config structure
This commit is contained in:
parent
f5980d2d46
commit
121ec4b61f
6
commerce.config.json
Normal file
6
commerce.config.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"provider": "bigcommerce",
|
||||||
|
"features": {
|
||||||
|
"wishlist": false
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"provider": "bigcommerce",
|
||||||
"features": {
|
"features": {
|
||||||
"wishlist": true
|
"wishlist": true
|
||||||
}
|
}
|
@ -1,10 +1,7 @@
|
|||||||
const providerConfig = require('./config.json')
|
const commerce = require('./commerce.config.json')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
commerce: {
|
commerce,
|
||||||
provider: 'bigcommerce',
|
|
||||||
...providerConfig,
|
|
||||||
},
|
|
||||||
images: {
|
images: {
|
||||||
domains: ['cdn11.bigcommerce.com'],
|
domains: ['cdn11.bigcommerce.com'],
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"provider": "shopify",
|
||||||
"features": {
|
"features": {
|
||||||
"wishlist": false
|
"wishlist": false
|
||||||
}
|
}
|
@ -1,10 +1,7 @@
|
|||||||
const providerConfig = require('./config.json')
|
const commerce = require('./commerce.config.json')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
commerce: {
|
commerce,
|
||||||
provider: 'shopify',
|
|
||||||
...providerConfig,
|
|
||||||
},
|
|
||||||
images: {
|
images: {
|
||||||
domains: ['cdn.shopify.com'],
|
domains: ['cdn.shopify.com'],
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
const commerce = require('./commerce.config.json')
|
||||||
const withCommerceConfig = require('./framework/commerce/with-config')
|
const withCommerceConfig = require('./framework/commerce/with-config')
|
||||||
|
|
||||||
const commerce = { provider: 'shopify' }
|
|
||||||
const isBC = commerce.provider === 'bigcommerce'
|
const isBC = commerce.provider === 'bigcommerce'
|
||||||
const isShopify = commerce.provider === 'shopify'
|
const isShopify = commerce.provider === 'shopify'
|
||||||
|
|
||||||
@ -39,3 +39,5 @@ module.exports = withCommerceConfig({
|
|||||||
].filter((x) => x)
|
].filter((x) => x)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('configs', module.exports)
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
"@components/*": ["components/*"],
|
"@components/*": ["components/*"],
|
||||||
"@commerce": ["framework/commerce"],
|
"@commerce": ["framework/commerce"],
|
||||||
"@commerce/*": ["framework/commerce/*"],
|
"@commerce/*": ["framework/commerce/*"],
|
||||||
"@framework": ["framework/shopify"],
|
"@framework": ["framework/bigcommerce"],
|
||||||
"@framework/*": ["framework/shopify/*"]
|
"@framework/*": ["framework/bigcommerce/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user