Skip to content

Commit

Permalink
Merge pull request #18 from THEOplayer/api-docs
Browse files Browse the repository at this point in the history
Publish API docs to GitHub Pages
  • Loading branch information
MattiasBuelens authored Apr 5, 2024
2 parents 0b934ac + a9bf219 commit c65385e
Show file tree
Hide file tree
Showing 29 changed files with 371 additions and 118 deletions.
6 changes: 6 additions & 0 deletions .changeset/hungry-crabs-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@theoplayer/yospace-connector-web": patch
"@theoplayer/cmcd-connector-web": patch
---

Fix missing API types in TypeScript type definitions.
51 changes: 51 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Based on https://github.com/actions/starter-workflows/blob/b53d05e4b0dde7cdaeda60476acfcaaa1713f8cc/pages/jekyll-gh-pages.yml
name: GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci --workspaces --include-workspace-root
- name: Build API docs
run: npm run docs -- --out ./_site/api
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- '**.md'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci --workspaces --include-workspace-root
- name: Build
run: npm run build
- name: Test
run: npm test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ node_modules/

# Generated by MacOS
.DS_Store

# TypeDoc
api/
1 change: 1 addition & 0 deletions .idea/web-connectors.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*/dist/
*/test/pages/
*/test/pages/

# TypeDoc
api/
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# THEOplayer Web SDK Connectors

This repository is maintained by [THEO Technologies](https://www.theoplayer.com/) and contains the different connectors
available for the THEOplayer Web SDK.

The THEOplayer Web SDK enables you to quickly deliver content playback on your website or web app.

Using the available connectors allows you to augment the features delivered through the Web SDK.

## Available Connectors

| Connector | npm package | Source code |
|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------|
| CMCD | ![@theoplayer/cmcd-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fcmcd-connector-web?label=%40theoplayer%2Fcmcd-connector-web) | [cmcd](https://github.com/THEOplayer/web-connectors/tree/main/cmcd) |
| Conviva | ![@theoplayer/conviva-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fconviva-connector-web?label=%40theoplayer%2Fconviva-connector-web) | [conviva](https://github.com/THEOplayer/web-connectors/tree/main/conviva) |
| Nielsen | ![@theoplayer/nielsen-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fnielsen-connector-web?label=%40theoplayer%2Fnielsen-connector-web) | [nielsen](https://github.com/THEOplayer/web-connectors/tree/main/nielsen) |
| Yospace | ![@theoplayer/yospace-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fyospace-connector-web?label=%40theoplayer%2Fyospace-connector-web) | [yospace](https://github.com/THEOplayer/web-connectors/tree/main/yospace) |

## License

The contents of this package are subject to the [THEOplayer license](https://www.theoplayer.com/terms).
4 changes: 2 additions & 2 deletions cmcd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"homepage": "https://theoplayer.com/",
"module": "dist/cmcd-connector.esm.js",
"types": "dist/cmcd-connector.d.ts",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/cmcd-connector.d.ts",
"types": "./dist/types/index.d.ts",
"import": "./dist/cmcd-connector.esm.js",
"require": "./dist/cmcd-connector.umd.js"
},
Expand Down
18 changes: 3 additions & 15 deletions cmcd/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
import { CMCDObjectType, CMCDPayload, CMCDReservedKey, CMCDStreamingFormat, CMCDStreamType } from './CMCDPayload';
import { TransmissionMode } from './Configuration';
import { CMCDConnector, CMCDPayloadProcessor, createCMCDConnector } from './CMCDConnector';

export {
CMCDConnector,
createCMCDConnector,
CMCDPayloadProcessor,
TransmissionMode,
CMCDPayload,
CMCDReservedKey,
CMCDStreamingFormat,
CMCDObjectType,
CMCDStreamType
};
export { CMCDObjectType, CMCDPayload, CMCDReservedKey, CMCDStreamingFormat, CMCDStreamType } from './CMCDPayload';
export * from './Configuration';
export { CMCDConnector, CMCDPayloadProcessor, createCMCDConnector } from './CMCDConnector';
18 changes: 8 additions & 10 deletions cmcd/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true,
"baseUrl": "./",
"rootDir": ".",
"paths": { "THEOplayer": ["./src/THEOplayer"] },
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
"rootDir": "src",
"outDir": "dist",
"declarationDir": "dist/types"
},
"include": [
"src/**/*"
]
}
12 changes: 12 additions & 0 deletions cmcd/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://typedoc.org/schema.json",
"extends": [
"../typedoc.base.json"
],
"entryPoints": [
"src/index.ts"
],
"tsconfig": "tsconfig.json",
"readme": "README.md",
"name": "CMCD Connector"
}
4 changes: 2 additions & 2 deletions conviva/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"repository": "https://github.com/THEOplayer/conviva-connector-web",
"homepage": "https://theoplayer.com/",
"module": "dist/conviva-connector.esm.js",
"types": "dist/conviva-connector.d.ts",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/conviva-connector.d.ts",
"types": "./dist/types/index.d.ts",
"import": "./dist/conviva-connector.esm.js",
"require": "./dist/conviva-connector.umd.js"
},
Expand Down
18 changes: 8 additions & 10 deletions conviva/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true,
"baseUrl": "./",
"rootDir": ".",
"paths": { "THEOplayer": ["./src/THEOplayer"] },
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
"rootDir": "src",
"outDir": "dist",
"declarationDir": "dist/types"
},
"include": [
"src/**/*"
]
}
12 changes: 12 additions & 0 deletions conviva/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://typedoc.org/schema.json",
"extends": [
"../typedoc.base.json"
],
"entryPoints": [
"src/index.ts"
],
"tsconfig": "tsconfig.json",
"readme": "README.md",
"name": "Conviva Connector"
}
4 changes: 2 additions & 2 deletions nielsen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "A connector implementing Nielsen with THEOplayer.",
"main": "dist/nielsen-connector.umd.js",
"module": "dist/nielsen-connector.esm.js",
"types": "dist/nielsen-connector.d.ts",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/nielsen-connector.d.ts",
"types": "./dist/types/index.d.ts",
"import": "./dist/nielsen-connector.esm.js",
"require": "./dist/nielsen-connector.umd.js"
},
Expand Down
18 changes: 8 additions & 10 deletions nielsen/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true,
"baseUrl": "./",
"rootDir": ".",
"paths": { "THEOplayer": ["./src/THEOplayer"] },
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
"rootDir": "src",
"outDir": "dist",
"declarationDir": "dist/types"
},
"include": [
"src/**/*"
]
}
12 changes: 12 additions & 0 deletions nielsen/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://typedoc.org/schema.json",
"extends": [
"../typedoc.base.json"
],
"entryPoints": [
"src/index.ts"
],
"tsconfig": "tsconfig.json",
"readme": "README.md",
"name": "Nielsen Connector"
}
Loading

0 comments on commit c65385e

Please sign in to comment.