forked from crowetic/commerce
Merge branch 'master' of github.com:vercel/commerce
This commit is contained in:
commit
4989c720e1
35
README.md
35
README.md
@ -9,7 +9,7 @@ Demo live at: [demo.vercel.store](https://demo.vercel.store/)
|
||||
|
||||
This project is currently <b>under development</b>.
|
||||
|
||||
## Goals and Features
|
||||
## Features
|
||||
|
||||
- Performant by default
|
||||
- SEO Ready
|
||||
@ -22,14 +22,24 @@ This project is currently <b>under development</b>.
|
||||
- Dark Mode Support
|
||||
|
||||
## Work in progress
|
||||
|
||||
We're using Github Projects to keep track of issues in progress and todo's. Here is our [Board](https://github.com/vercel/commerce/projects/1)
|
||||
|
||||
## Integrations
|
||||
|
||||
Next.js Commerce integrates out-of-the-box with BigCommerce. We plan to support all major ecommerce backends.
|
||||
|
||||
If you wish to work on a new cms/headless ecommerce provider, please check this repo https://github.com/vercel/commerce-framework and open a PR with your functions and utilities under the standard mentioned in the README.
|
||||
|
||||
## Goals
|
||||
|
||||
* **Next.js Commerce** should have a completely data **agnostic** UI
|
||||
* **Aware of schema**: should ship with the right data schemas and types.
|
||||
* All providers should return the right data types and schemas to blend correctly with Next.js Commerce.
|
||||
* `@framework` will be the alias utilized in commerce and it will map to the ecommerce provider of preference- e.g BigCommerce, Shopify, Swell. All providers should expose the same standardized functions. _Note that the same applies for recipes using a CMS + an ecommerce provider._
|
||||
|
||||
There is a `framework` folder in the root folder that will contain multiple ecommerce providers.
|
||||
|
||||
Additionally, we need to ensure feature parity (not all providers have e.g. wishlist) we will also have to build a feature API to disable/enable features in the UI.
|
||||
|
||||
People actively working on this project: @okbel & @lfades.
|
||||
|
||||
## Troubleshoot
|
||||
|
||||
@ -80,20 +90,9 @@ Our commitment to Open Source can be found [here](https://vercel.com/oss).
|
||||
6. Add proper store values to `.env.local`.
|
||||
7. Run `yarn dev` to build and watch for code changes
|
||||
8. The development branch is `development` (this is the branch pull requests should be made against).
|
||||
On a release, the relevant parts of the changes in the `staging` branch are rebased into `master`.
|
||||
|
||||
## Goals
|
||||
|
||||
* **Next.js Commerce** should have a completely data **agnostic** UI
|
||||
* **Aware of schema**: should ship with the right data schemas and types.
|
||||
* All providers should return the right data types and schemas to blend correctly with Next.js Commerce.
|
||||
* `@framework` will be the alias utilized in commerce and it will map to the ecommerce provider of preference- e.g BigCommerce, Shopify, Swell. All providers should expose the same standardized functions. _Note that the same applies for recipes using a CMS + an ecommerce provider._
|
||||
|
||||
There is a `framework` folder in the root folder that will contain multiple ecommerce providers.
|
||||
|
||||
Additionally, we need to ensure feature parity (not all providers have e.g. wishlist) we will also have to build a feature API to disable/enable features in the UI.
|
||||
|
||||
People actively working on this project: @okbel & @lfades.
|
||||
On a release, `develop` branch is rebased into `master`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Fallback to CMS Data
|
||||
|
||||
export const defatultPageProps = {
|
||||
export const defaultPageProps = {
|
||||
header: {
|
||||
links: [
|
||||
{
|
||||
|
@ -3,14 +3,14 @@ import type {
|
||||
GetStaticPropsContext,
|
||||
InferGetStaticPropsType,
|
||||
} from 'next'
|
||||
import { Text } from '@components/ui'
|
||||
import { Layout } from '@components/common'
|
||||
import getSlug from '@lib/get-slug'
|
||||
import { missingLocaleInPages } from '@lib/usage-warns'
|
||||
import { Layout } from '@components/common'
|
||||
import { Text } from '@components/ui'
|
||||
import { getConfig } from '@framework/api'
|
||||
import getPage from '@framework/api/operations/get-page'
|
||||
import getAllPages from '@framework/api/operations/get-all-pages'
|
||||
import { defatultPageProps } from '@lib/defaults'
|
||||
import { defaultPageProps } from '@lib/defaults'
|
||||
|
||||
export async function getStaticProps({
|
||||
preview,
|
||||
@ -34,7 +34,7 @@ export async function getStaticProps({
|
||||
}
|
||||
|
||||
return {
|
||||
props: { ...defatultPageProps, pages, page },
|
||||
props: { ...defaultPageProps, pages, page },
|
||||
revalidate: 60 * 60, // Every hour
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,4 @@
|
||||
import Document, {
|
||||
DocumentContext,
|
||||
Head,
|
||||
Html,
|
||||
Main,
|
||||
NextScript,
|
||||
} from 'next/document'
|
||||
import Document, { Head, Html, Main, NextScript } from 'next/document'
|
||||
|
||||
class MyDocument extends Document {
|
||||
render() {
|
||||
|
@ -6,7 +6,7 @@ import { Layout } from '@components/common'
|
||||
import { Heart } from '@components/icons'
|
||||
import { Text, Container } from '@components/ui'
|
||||
import { WishlistCard } from '@components/wishlist'
|
||||
import { defatultPageProps } from '@lib/defaults'
|
||||
import { defaultPageProps } from '@lib/defaults'
|
||||
|
||||
export async function getStaticProps({
|
||||
preview,
|
||||
@ -15,7 +15,7 @@ export async function getStaticProps({
|
||||
const config = getConfig({ locale })
|
||||
const { pages } = await getAllPages({ config, preview })
|
||||
return {
|
||||
props: { ...defatultPageProps, pages },
|
||||
props: { ...defaultPageProps, pages },
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user