You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`yarn prepare` - Build the package using package-prepare
16
+
-`npm publish` - Transpile and publish to NPM
17
+
18
+
### Testing
19
+
Tests are located in the `tests/` directory. To run a specific test file:
20
+
```bash
21
+
yarn test tests/[filename].test.js
22
+
```
23
+
24
+
## Architecture
25
+
26
+
This package is a GraphQL content layer for fetching and processing conference content from GraphCMS. It:
27
+
28
+
1.**Fetches data** from GraphCMS using GraphQL queries through multiple fetch modules (`fetch-*.js`)
29
+
2.**Processes content** through a post-processing layer that merges talks, Q&A sessions, and populates speaker activities
30
+
3.**Exposes content** via the `getContent` async function for consumption
31
+
4.**Generates Storybook** for visualizing both CMS and content layers
32
+
33
+
### Key Components
34
+
35
+
-**Entry point**: `src/index.js` - Creates GraphQL client and orchestrates all content fetching
36
+
-**Content fetchers**: `src/fetch-*.js` files - Each handles a specific content type (speakers, talks, sponsors, etc.)
37
+
-**Post-processing**: `src/postprocess.js` - Merges and enriches content relationships
38
+
-**Configuration**: Requires `CMS_ENDPOINT` and `CMS_TOKEN` environment variables for GraphCMS connection
39
+
-**Conference settings**: Must be passed to `getContent()` with conference-specific data including `conferenceTitle`, `eventYear`, `tagColors`, and `speakerAvatar` dimensions
40
+
41
+
### Content Flow
42
+
1. Conference settings are passed to `getContent(conferenceSettings)`
43
+
2. All fetch modules run in parallel via Promise.all
44
+
3. Content pieces are merged with conflict resolution for duplicate keys
0 commit comments