This Turborepo template:
- allows you to develop your own Remotion libraries and components
- includes best practices for developing Remotion libraries out of the box
- includes an example package for testing your library
To create your own library, use this repository as a template.
After cloning the resulting library, start developing it:
pnpm i
pnpm run dev
Open the browser on http://localhost:3000 to see the testbed.
Edit the packages/library
folder to change your library and edit packages/example
to edit your testbed.
This template does not include React by default.
If you are shipping a React component, you can add it to your library by running:
cd packages/library
npm i "react@^18.0.0" "react-dom@^18.0.0" --save-peer
pnpm i @types/react @types/react-dom --save-dev
Change the versions to the ones you want to support.
To lint your code, run:
pnpm run lint
either from the root or from an individual package.
Before publishing, you should change the default name of my-library
to your library name.
- Stop all commands such as
pnpm run dev
- Ensure your desired NPM package name is available.
- Find and replace all occurrences of
my-library
with your library name in the project, except for the occurence inpnpm-lock.yaml
- Run
pnpm i
.
Also change your name in packages/library/LICENSE.md
and packages/library/package.json
as well as adjust the packages/library/README.md
.
- Run
pnpm run build
to build your library. - Increment the version of your library in
packages/library/package.json
. - Run
pnpm recursive publish
to publish your library to NPM.
You can clear all caches and dependencies by running the following command in the root:
pnpm run clean
This package was authored by Mohit Yadav and inspired by Create-t3-turbo.