贡献到 Remotion
问题和各种拉取请求都受欢迎!
对于更大的项目,请与 Jonny Burger 协调(jonny@remotion.dev,Discord:@jonnyburger),以确保您的更改被合并。
请注意,由于公司在使用 Remotion 时我们会收费,这是一个商业项目。
通过发送拉取请求,您同意我们可以在商业环境中使用您的代码更改。
此外,请注意您不能重新分发此项目。请查看 LICENSE.md 以了解允许的内容和不允许的内容。
此项目遵守贡献者行为准则。参与此项目即表示您同意遵守其条款。
设置
pnpm v8.10.2
作为此存储库中的开发包管理器。我们建议使用
Corepack,这样您就可以获得与我们相同版本的 pnpm。
shcorepack enable
shcorepack enable
如果您没有 corepack,请手动安装 pnpm@8.10.2:
shnpm i -g pnpm@8.10.2
shnpm i -g pnpm@8.10.2
必要时加上 sudo 前缀。
版本必须是 8.10.2。
我们使用 Bun 来加速构建的某些部分。
在您的系统上至少安装 Bun 1.1.7 - 请 参阅 https://bun.sh/ 以获取说明。
shgit clone --depth=1 https://github.com/remotion-dev/remotion.git && cd remotion
shgit clone --depth=1 https://github.com/remotion-dev/remotion.git && cd remotion
Remotion 的完整 Git 历史很大。为节省时间和磁盘空间,我们建议添加 --depth=1 以仅克隆最近的 main 分支。
shpnpm i
shpnpm i
shpnpm build
shpnpm build
shpnpm watch
shpnpm watch
测试您的更改
您可以使用以下命令启动 Testbed:
shcd packages/examplepnpm start
shcd packages/examplepnpm start
您可以使用以下命令渲染测试视频:
shcd packages/examplepnpm render
shcd packages/examplepnpm render
您可以使用以下命令运行测试:
shpnpm test
shpnpm test
在子包中运行测试以运行该包的测试,或在根目录中运行以运行所有测试。
运行 @remotion/player 测试平台
您可以通过启动 Player 测试平台来测试对 @remotion/player 的更改:
shcd packages/player-examplepnpm start
shcd packages/player-examplepnpm start
有关测试的信息,请参阅 TESTING.md。欢迎各种问题和拉取请求!
运行文档
您可以使用以下命令运行驱动我们文档的 Docusaurus 服务器:
shcd packages/docspnpm start
shcd packages/docspnpm start
运行 CLI
您可以通过转到 packages/examples 目录并使用 pnpm exec 来执行 CLI 来测试对 CLI 的更改:
shcd packages/examples# Example - Get available compositionspnpm exec remotion compositions# Example - Render commandpnpm exec remotion render ten-frame-tester --output ../../out/video.mp4
shcd packages/examples# Example - Get available compositionspnpm exec remotion compositions# Example - Render commandpnpm exec remotion render ten-frame-tester --output ../../out/video.mp4
故障排除
如果您的 pnpm build 抛出错误,通常是由于缓存问题。您可以通过运行以下命令解决许多这些错误:
tspnpm run clean
tspnpm run clean
在清理文件时,请确保先终止任何 pnpm watch 命令,因为这些命令可能会在您清理文件时重新生成文件!
开发 Rust 部分
要开发 Remotion 的 Rust 部分,请参阅 此处。