Skip to content

Commit 4a138fa

Browse files
committed
added contentful uploader
1 parent eb29736 commit 4a138fa

File tree

15 files changed

+13213
-0
lines changed

15 files changed

+13213
-0
lines changed

contentful-uploader/.babelrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"useBuiltIns": false,
7+
"modules": false
8+
}
9+
],
10+
[
11+
"@babel/preset-react",
12+
{
13+
"useBuiltIns": true
14+
}
15+
]
16+
],
17+
"plugins": [
18+
[
19+
"@babel/plugin-proposal-class-properties",
20+
{
21+
"loose": true
22+
}
23+
],
24+
[
25+
"@babel/plugin-transform-runtime",
26+
{
27+
"corejs": false,
28+
"helpers": false,
29+
"regenerator": true
30+
}
31+
]
32+
]
33+
}

contentful-uploader/.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# dotenv environment variables file
9+
.env
10+
.contentfulrc.json
11+
12+
# Parcel-bundler cache
13+
.cache
14+
15+
# Dependency directories
16+
node_modules/
17+
18+
# Build
19+
build/

contentful-uploader/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
![Contentful + Mux](https://banner-generator-cj08cfagy.now.sh/?text=Contentful)
2+
3+
# Contentful Video Streaming Plugin
4+
5+
A Contentful UI extension that makes it simple to add beautiful streaming via [Mux](https://https://mux.com) to your [Contentful](https://contentful.com) project. Just install the extension, add the component to your content model, and you're good to go! 🙌🏾
6+
7+
## Install via the CLI
8+
9+
Make sure you have the Contentful CLI installed:
10+
11+
```
12+
npm install contentful-cli -g
13+
```
14+
15+
You are logged in:
16+
17+
```
18+
contentful login
19+
```
20+
21+
And have a space selected:
22+
23+
```
24+
contentful space use
25+
```
26+
27+
To install the UI Extension:
28+
29+
```
30+
contentful extension create
31+
```
32+
33+
To update the UI Extension:
34+
35+
```
36+
contentful extension update --force
37+
```
38+
39+
Note: by default this installs the hosted version of our extension. If you'd like to self-host this extension, you may update `extension.json` to use your own `src`, but keep in mind you'll need to have your own solution for handling CORS requests.

contentful-uploader/extension.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"id": "mux-contentful-uploader",
3+
"name": "Mux Contentful Uploader",
4+
"src": "https://contentful.mux.dev",
5+
"fieldTypes": ["Object"],
6+
"parameters": {
7+
"installation": [
8+
{
9+
"id": "muxAccessTokenId",
10+
"name": "Mux Access Token ID",
11+
"description": "You can create access tokens here: https://dashboard.mux.com/settings/access-tokens)",
12+
"type": "Symbol",
13+
"required": true
14+
},
15+
{
16+
"id": "muxAccessTokenSecret",
17+
"name": "Mux Access Token Secret",
18+
"description": "You can create access tokens here: https://dashboard.mux.com/settings/access-tokens",
19+
"type": "Symbol",
20+
"required": true
21+
}
22+
]
23+
}
24+
}

contentful-uploader/now.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"version": 2,
3+
"alias": "contentful.mux.dev",
4+
"builds": [
5+
{
6+
"src": "/static-styles/*.css",
7+
"use": "@now/static"
8+
},
9+
{
10+
"src": "*.md",
11+
"use": "@now/md",
12+
"config": {
13+
"title": "Contentful Mux Video Plugin",
14+
"language": "en",
15+
"meta": [
16+
{
17+
"name": "description",
18+
"content": "Add beautiful video streaming to your Contentful dashboard! Mux Video extension that's installed in minutes"
19+
}
20+
],
21+
"css": ["/static-styles/base.css", "/static-styles/mux.css"]
22+
}
23+
},
24+
{
25+
"src": "package.json",
26+
"use": "@now/static-build",
27+
"config": { "distDir": "build" }
28+
}
29+
],
30+
"routes": [
31+
{ "src": "/", "dest": "/README.html" },
32+
{ "src": "/extension", "dest": "index.html" }
33+
]
34+
}

0 commit comments

Comments
 (0)