Skip to content

🎥 Make videos programmatically with React

update contributing docs

Jonny Burgerbc1703a04b7e
diff --git a/packages/docs/components/PrereleaseVersion.tsx b/packages/docs/components/PrereleaseVersion.tsx
index 74ba890b55..c1a38024a0 100644
--- a/packages/docs/components/PrereleaseVersion.tsx
+++ b/packages/docs/components/PrereleaseVersion.tsx
@@ -1,55 +1,40 @@
-import React from "react";
+import React from 'react';
-const FALLBACK_VERSION = "4.0.1";
+const FALLBACK_VERSION = '4.0.1';
export const Prerelease: React.FC<{
- readonly onlySnippet: boolean;
- readonly packageName: string;
-}> = ({ onlySnippet, packageName = "@remotion/lambda" }) => {
- const version =
- typeof URLSearchParams === "undefined"
- ? FALLBACK_VERSION
- : typeof window === "undefined"
- ? FALLBACK_VERSION
- : new URLSearchParams(window.location.search).get("version") ??
- FALLBACK_VERSION;
- return (
- <div>
- {onlySnippet ? null : (
- <div>
- <p>
- If you have received a prerelease version of Remotion, such as
- <code>{version}</code>, this is how you install it:
- </p>
- <p>
- Replace all packages that are part of Remotion, such as{" "}
- <code>remotion</code>, <code>@remotion/renderer</code>,
- <code>@remotion/lambda</code>, etc with the version that you have
- received:
- </p>
- </div>
- )}
- <pre className="code-container">
- {[
- "@remotion/bundler",
- "@remotion/renderer",
- packageName,
- "remotion",
- ].map((r) => {
- return (
- <div key={r}>
- <span style={{ color: "#e13238" }}>
- - &quot;{r}&quot;: &quot;{"4.0.0"}&quot;
- </span>
- {"\n"}
- <span style={{ color: "#009400" }}>
- + &quot;{r}&quot;: &quot;{version}&quot;
- </span>
- {"\n"}
- </div>
- );
- })}
- </pre>
- </div>
- );
+ readonly packageName: string;
+}> = ({packageName = '@remotion/lambda'}) => {
+ const version =
+ typeof URLSearchParams === 'undefined'
+ ? FALLBACK_VERSION
+ : typeof window === 'undefined'
+ ? FALLBACK_VERSION
+ : (new URLSearchParams(window.location.search).get('version') ??
+ FALLBACK_VERSION);
+ return (
+ <div>
+ <pre className="code-container">
+ {[
+ '@remotion/bundler',
+ '@remotion/renderer',
+ packageName,
+ 'remotion',
+ ].map((r) => {
+ return (
+ <div key={r}>
+ <span style={{color: '#e13238'}}>
+ - &quot;{r}&quot;: &quot;{'4.0.0'}&quot;
+ </span>
+ {'\n'}
+ <span style={{color: '#009400'}}>
+ + &quot;{r}&quot;: &quot;{version}&quot;
+ </span>
+ {'\n'}
+ </div>
+ );
+ })}
+ </pre>
+ </div>
+ );
};
diff --git a/packages/docs/docs/cloudrun/upgrading.mdx b/packages/docs/docs/cloudrun/upgrading.mdx
index aa78d54480..1f38daa46b 100644
--- a/packages/docs/docs/cloudrun/upgrading.mdx
+++ b/packages/docs/docs/cloudrun/upgrading.mdx
@@ -16,7 +16,7 @@ import {Prerelease} from '../../components/PrereleaseVersion';
- Determine the newest version from the [Releases page](https://github.com/remotion-dev/remotion/releases).
- Upgrade all packages to the newest version (`@remotion/cloudrun`, but also `remotion`, `@remotion/cli` etc.)
-<Prerelease onlySnippet packageName="@remotion/cloudrun" />
+<Prerelease packageName="@remotion/cloudrun" />
- (Optional): Remove the old versions of the service:
@@ -24,19 +24,19 @@ import {Prerelease} from '../../components/PrereleaseVersion';
You only should do this if the service is not being used anymore. If you are still using it in production, you can just skip this step.
:::
-```
+```sh
npx remotion cloudrun services rmall -y
```
- Deploy the newest version of the Remotion Cloud Run service:
-```
+```sh
npx remotion cloudrun services deploy
```
- Update the site:
-```
+```sh
npx remotion cloudrun sites create src/index.ts --site-name=my-name
```
diff --git a/packages/docs/docs/contributing/index.mdx b/packages/docs/docs/contributing/index.mdx
index cf45f3f35a..96e98910e5 100644
--- a/packages/docs/docs/contributing/index.mdx
+++ b/packages/docs/docs/contributing/index.mdx
@@ -20,7 +20,7 @@ This project is released with a [Contributor Code of Conduct](https://remotion.d
<Step>1</Step> Remotion uses [`Bun`](https://bun.com) v1.3.3 as the package manager for development in this repository. The version must be at least `1.3.3`.
-```
+```sh
curl -fsSL https://bun.com/install | bash -s "bun-v1.3.3"
```
@@ -108,10 +108,10 @@ bun run start
## Running the CLI
-You can test changes to the CLI by moving to `packages/examples` directory and using `bunx` to execute the CLI:
+You can test changes to the CLI by moving to `packages/example` directory and using `bunx` to execute the CLI:
```sh
-cd packages/examples
+cd packages/example
# Example - Get available compositions
bunx remotion compositions
# Example - Render command
@@ -156,6 +156,10 @@ bun run clean
in the root directory. Make sure to beforehand kill any `bun run watch` commands, as those might regenerate files as you clean them!
+## Developing new transition presentations
+
+To develop new transition presentations, see [here](/docs/contributing/presentation).
+
## Developing Rust parts
To develop the Rust parts of Remotion, see [here](/docs/contributing/rust).
diff --git a/packages/docs/docs/contributing/presentation.mdx b/packages/docs/docs/contributing/presentation.mdx
index b293749655..0e40217a00 100644
--- a/packages/docs/docs/contributing/presentation.mdx
+++ b/packages/docs/docs/contributing/presentation.mdx
@@ -7,16 +7,17 @@ crumb: Contributing
Make your custom presentation accessible for others in the `@remotion/transitions` package.
-## Setup the remotion project
+## Setup the Remotion project
-If this is your first contribution, see the <a href="https://github.com/remotion-dev/remotion/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a> file for information on how to contribute and instructions to set up the remotion project.
+If this is your first contribution, see the [main instructions](/docs/contributing) first.
## How to proceed
-<Step>1</Step> Create a custom transition. Loook at the <a href="/docs/transitions/presentations/custom">custom presentation</a> docs to see how it's done.<br/>
-<Step>2</Step>Add your presentation to the remotion monorepository under <code>packages/transitions/src/presentations</code>.<br/>
+<Step>1</Step> Create a custom transition. Loook at the <a href="/docs/transitions/presentations/custom">custom presentation</a> docs to see how it's done.
+<br />
+<Step>2</Step>Add your presentation to the remotion monorepository under <code>packages/transitions/src/presentations</code>.<br />
<Step>3</Step> In the <code>bundle.ts</code>, add your presentation to the <code>presentations array</code>.
-<br/>
+<br />
```tsx
const presentations = ['slide', 'flip', 'wipe', 'fade', ..., 'yourPresentation'];
@@ -53,18 +54,16 @@ Make sure to `pnpm build` in `remotion/packages/transitions` so your transition
&nbsp;&nbsp;&nbsp;&nbsp; For more help on how to write a documentation, see the [contributing to the documentation](/docs/contributing/docs) page.
-<Step>6</Step> Add your presentation to the table of contents at <a href="/docs/transitions/presentations">docs/transitions/presentations</a> by creating a <code>&lt;TOCItem&gt;</code> containing a link to your documentation, a <code>&lt;PresentationPreview</code> displaying your presentation and a one-liner describing what your presentation does.
+<Step>6</Step> Add your presentation to the table of contents at <a href="/docs/transitions/presentations">docs/transitions/presentations</a> by creating a <code>&lt;TOCItem&gt;</code> containing a link to your documentation, a <code>&lt;PresentationPreview</code> displaying your presentation and a
+one-liner describing what your presentation does.
```tsx title="Example TOCItem"
<TOCItem link="/docs/transitions/presentations/yourPresentation">
<div style={row}>
- <PresentationPreview
- durationRestThreshold={0.001}
- effect={yourPresentation()}
- />
- <div style={{ flex: 1, marginLeft: 10 }}>
+ <PresentationPreview durationRestThreshold={0.001} effect={yourPresentation()} />
+ <div style={{flex: 1, marginLeft: 10}}>
<strong>
- <code>{"yourPresentation()"}</code>
+ <code>{'yourPresentation()'}</code>
</strong>
<div>Insert one-liner describing your presentation</div>
</div>
diff --git a/packages/docs/docs/contributing/rust.mdx b/packages/docs/docs/contributing/rust.mdx
index 18e75cfc0d..0bb6b6aeb8 100644
--- a/packages/docs/docs/contributing/rust.mdx
+++ b/packages/docs/docs/contributing/rust.mdx
@@ -7,6 +7,10 @@ crumb: Contributing
# Rust development
+:::note
+As we migrate to the [new media tags](/docs/mediabunny/new-video), we will not add any new Rust code, only maintain the existing code.
+:::
+
To participate in the development of the Rust parts of Remotion, you need to do additional steps.
These are entirely optional if you only touch the TypeScript parts.
diff --git a/packages/docs/docs/lambda/upgrading.mdx b/packages/docs/docs/lambda/upgrading.mdx
index ad4ecb98e6..3e73f687c2 100644
--- a/packages/docs/docs/lambda/upgrading.mdx
+++ b/packages/docs/docs/lambda/upgrading.mdx
@@ -7,39 +7,39 @@ slug: /lambda/upgrading
import {Prerelease} from '../../components/PrereleaseVersion';
-- Determine the newest version from the [Releases page](https://github.com/remotion-dev/remotion/releases).
-- Upgrade all packages to the newest version (`@remotion/lambda`, but also `remotion`, `@remotion/cli` etc.)
+1. Upgrade all packages to the newest version (`@remotion/lambda`, but also `remotion`, `@remotion/cli` etc.)
-<Prerelease onlySnippet packageName="@remotion/lambda" />
+```sh
+npx remotion upgrade
+```
+
+<Prerelease packageName="@remotion/lambda" />
-- (Optional): Remove the old versions of the function:
+2. (Optional): Remove the old versions of the function:
:::info
You only should do this if the function is not being used anymore. If you are still using it in production, you can just skip this step.
:::
-```
+```sh
npx remotion lambda functions rmall -y
```
-- Deploy the newest version of the Remotion Lambda function:
+3. Deploy the newest version of the Remotion Lambda function:
-```
+```sh
npx remotion lambda functions deploy
```
-- Update the site:
+4. Update the site:
-```
+```sh
npx remotion lambda sites create src/index.ts --site-name=my-name
```
-:::info
-
Pass `--site-name` with the name of an existing site to update it. The URL will stay the same but older functions may not be able to render the updated site.
If you don't pass `--site-name` a new site URL will be generated. You'll need to update the [`serveUrl`](/docs/lambda/rendermediaonlambda#serveurl) parameter in your [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda) calls. Old deployed functions can still render by specifying the old serve URL.
-:::
## Separating production and testing environments
diff --git a/packages/docs/docs/prereleases.mdx b/packages/docs/docs/prereleases.mdx
deleted file mode 100644
index bdc4c31713..0000000000
--- a/packages/docs/docs/prereleases.mdx
+++ /dev/null
@@ -1,17 +0,0 @@
----
-image: /generated/articles-docs-prereleases.png
-id: prereleases
-slug: /prereleases
-title: Testing prereleases
-crumb: "Only the brave"
----
-
-import {Prerelease} from "../components/PrereleaseVersion"
-
-<Prerelease />
-
-:::warning
-Make sure that you remove the `^` character from the version. If you don't, you get the version with the alphabetically highest hash, which is a random version of Remotion rather than the one you want.
-:::
-
-Afterwards, run `yarn`, `npm i` or `pnpm i` respectively.
diff --git a/packages/docs/docs/version-mismatch.mdx b/packages/docs/docs/version-mismatch.mdx
index d9dee8b84e..e985484afb 100644
--- a/packages/docs/docs/version-mismatch.mdx
+++ b/packages/docs/docs/version-mismatch.mdx
@@ -2,7 +2,7 @@
image: /generated/articles-docs-version-mismatch.png
id: version-mismatch
title: Version mismatch
-crumb: "How to fix a"
+crumb: 'How to fix a'
---
It is important that all Remotion packages you install (`remotion`, `@remotion/player`, `@remotion/cli`, etc.) have the same version installed. If the versions differ, the packages might not be able to correctly communicate with each other which can introduce subtle bugs or even complete breakage.
@@ -73,9 +73,3 @@ npx remotion versions
```
to see which packages and versions your project contains.
-
-## Testing prereleases
-
-If we have given you a prerelease version of Remotion to test, the same principle applies, where you should not just upgrade the affected package, but all packages including `remotion` and packages starting with `@remotion`.
-
-**See also:** [Testing prereleases](/docs/prereleases)
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index 7d2886210d..1d7a148893 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1365,7 +1365,6 @@ const sidebars: SidebarsConfig = {
'contributing/rust',
'contributing/presentation',
'authoring-packages',
- 'prereleases',
'contributing/ineligible',
],
},
diff --git a/packages/docs/static/generated/articles-docs-prereleases.png b/packages/docs/static/generated/articles-docs-prereleases.png
deleted file mode 100644
index ac4ca1b405..0000000000
Binary files a/packages/docs/static/generated/articles-docs-prereleases.png and /dev/null differ