Skip to main content

编写一个 Remotion 库

编写一个 Remotion 库的方式与编写一个普通的 React 库相同。通常,它会被发布到 GitHub 和 NPM。

🌐 Authoring a Remotion library works the same as authoring a normal React library. Usually, it is being published to GitHub and NPM.

起始模板

🌐 Starter template

Remotion 的库入门模板 是创建可与 Remotion 一起使用的库或组件的推荐方式。它:

  • 正确地将你的库打包为 ESM + CJS
  • 内置了一个 Remotion Studio 实例,用于测试你的库
  • 正确定义 Remotion 为同级依赖
  • 已配置 TypeScript、ESLint 和 Turborepo

发布

🌐 Publishing

你有三种方式来发布你的库:

🌐 You have three options to publish your library:

  • 免费发布到 NPM:这是入门模板的默认设置。
  • 通过 NPM 亭自行销售:更多信息请参见 NPM 亭
  • 申请在 Remotion Store 上架:发送电子邮件至 hi@remotion.dev 提出申请。

另请参阅

🌐 See also