-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
2,862 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
|
||
- name: Install Dependencies | ||
run: pnpm i | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Publish to NPM | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: ./packages/core/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
node_modules | ||
dist | ||
.turbo | ||
.env | ||
.cache | ||
.DS_Store | ||
*.log | ||
*.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ProjectConfiguration } from "open-headless"; | ||
import { typo3 } from "open-headless/connectors"; | ||
|
||
const config: ProjectConfiguration = { | ||
name: "My Project", | ||
cmsConnector: typo3, | ||
cmsPath: "http://cms.my-project.com", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"build": "turbo build", | ||
"dev": "turbo dev --no-cache --continue" | ||
}, | ||
"devDependencies": { | ||
"turbo": "^1.10.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from '@/connectors/typo3'; | ||
export { default as typo3 } from "@/connectors/typo3"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* Holds the central configuration of your project. | ||
*/ | ||
interface ProjectConfiguration { | ||
name: string; | ||
cmsConnector: CmsConnector; | ||
cmsPath: string; | ||
} | ||
|
||
interface IdentifiableObject { | ||
id: string; | ||
} | ||
|
||
/** | ||
* The PageMeta holds metainformation about the page. | ||
* For example, this can be used to hold properties relevant for SEO. | ||
*/ | ||
interface PageMeta { | ||
title?: string; | ||
description?: string; | ||
} | ||
|
||
/** | ||
* The content you see on a website is made up of so called 'content elements'. | ||
* They are the smallest building blocks of a page. | ||
* A section, a hero image, a text block are all content elements. | ||
*/ | ||
interface ContentElement extends IdentifiableObject { | ||
name: string; | ||
type: string; | ||
content?: { [key: string]: unknown }; | ||
} | ||
|
||
interface PageLayout extends IdentifiableObject { | ||
name: string; | ||
} | ||
|
||
interface Page extends IdentifiableObject { | ||
layout: PageLayout; | ||
meta: PageMeta; | ||
content: ContentElement[]; | ||
} | ||
|
||
interface Redirect extends IdentifiableObject { | ||
statusCode?: number; | ||
target: string; | ||
} | ||
|
||
type CmsResponse = Page | Redirect; | ||
|
||
/** | ||
* A CmsConnector is a connector to a content management system (CMS). | ||
* It is used to request data the CMS. | ||
*/ | ||
interface CmsConnector { | ||
requestPage(path?: string, cmsPath?: string): Promise<Page | Redirect>; | ||
} | ||
|
||
export type { | ||
ProjectConfiguration, | ||
CmsConnector, | ||
CmsResponse, | ||
Page, | ||
Redirect, | ||
PageMeta, | ||
ContentElement, | ||
IdentifiableObject, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1 @@ | ||
/** | ||
* Holds the central configuration of your project. | ||
*/ | ||
interface ProjectConfiguration { | ||
name: string; | ||
cmsConnector: CmsConnector; | ||
cmsPath: string; | ||
} | ||
|
||
interface IdentifiableObject { | ||
id: string; | ||
} | ||
|
||
/** | ||
* The PageMeta holds metainformation about the page. | ||
* For example, this can be used to hold properties relevant for SEO. | ||
*/ | ||
interface PageMeta { | ||
title?: string; | ||
description?: string; | ||
} | ||
|
||
/** | ||
* The content you see on a website is made up of so called 'content elements'. | ||
* They are the smallest building blocks of a page. | ||
* A section, a hero image, a text block are all content elements. | ||
*/ | ||
interface ContentElement extends IdentifiableObject { | ||
name: string; | ||
type: string; | ||
content?: { [key: string]: unknown }; | ||
} | ||
|
||
interface PageLayout extends IdentifiableObject { | ||
name: string; | ||
} | ||
|
||
interface Page extends IdentifiableObject { | ||
layout: PageLayout; | ||
meta: PageMeta; | ||
content: ContentElement[]; | ||
} | ||
|
||
interface Redirect extends IdentifiableObject { | ||
statusCode?: number; | ||
target: string; | ||
} | ||
|
||
type CmsResponse = Page | Redirect; | ||
|
||
/** | ||
* A CmsConnector is a connector to a content management system (CMS). | ||
* It is used to request data the CMS. | ||
*/ | ||
interface CmsConnector { | ||
requestPage(path?: string, cmsPath?: string): Promise<Page | Redirect>; | ||
} | ||
|
||
export type { | ||
ProjectConfiguration, | ||
CmsConnector, | ||
CmsResponse, | ||
Page, | ||
Redirect, | ||
PageMeta, | ||
ContentElement, | ||
IdentifiableObject, | ||
}; | ||
export * from '@/core'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.