remotion-dev/remotion












The issue has been solved
Make entry point optional #1391
JonnyBurger posted onGitHub
š This issue is part of our Hacktoberfest campaign! š Read more about Hacktoberfest here š This issue is currently assigned to @Pompette š° Thanks to CodeChem for sponsoring this issue! ā ļø This issue can only be taken once #1377 is finished!
Each Remotion command starts with npx remotion [command] [entry-point]
:
npx remotion preview src/index.tsx
npx remotion render src/index.tsx
npx remotion benchmark src/index.tsx
The goal is to make it that if you omit the entry point, Remotion will detect it itself:
Rules:
- First priority: If the entry point is specified, use it.
- Second priority: Add a new rule in the config file:
Config.Preview.setEntryPoint('src/index.tsx')
(subject to change) and check if it is set. If so, use it - Third priority: Look for common paths like
src/index.tsx
,src/index.ts
,src/index.js
,remotion/index.js
. If that is the case, useLog.verbose
to print out the path that Remotion has decided on - Fourth priority: Fail because entry point could not be determined.
Acceptance criteria
- Implement logic according to rules above
- Update the CLI section of the documentation to reflect that you don't have to pass the entry point anymore and document the rules of order.