Skip to content

🎥 Make videos programmatically with React

create-video: Add local smoke-test shortcut

JonnyBurger28a91e986194
diff --git a/new b/new
index c43528081f..05d5449631 100755
--- a/new
+++ b/new
@@ -1,6 +1,7 @@
#!/usr/bin/env bun
import {randomUUID} from 'node:crypto';
+import {tmpdir} from 'node:os';
import {
cpSync,
existsSync,
@@ -24,6 +25,7 @@ import {localPackageRootKey} from './packages/studio-server/src/helpers/get-loca
const repositoryRoot = import.meta.dir;
const agentPluginRoot = join(repositoryRoot, 'packages', 'agent-plugin');
const useOldVersion = process.argv.includes('--old');
+const useCreateVideo = process.argv.includes('--create');
const run = (command: string[], cwd = repositoryRoot) => {
const result = Bun.spawnSync(command, {
@@ -38,6 +40,24 @@ const run = (command: string[], cwd = repositoryRoot) => {
}
};
+if (useCreateVideo) {
+ console.log('Building create-video...');
+ run(['bunx', 'turbo', 'run', 'make', '--filter=create-video', '--no-update-notifier']);
+
+ console.log('\nRunning create-video...');
+ run(
+ [
+ 'node',
+ join(repositoryRoot, 'packages', 'create-video', 'bin.js'),
+ '--yes',
+ '--blank',
+ '--tmp',
+ ],
+ tmpdir(),
+ );
+ process.exit(0);
+}
+
if (!useOldVersion) {
console.log('Building the current repository state...');
run(['bunx', 'turbo', 'run', 'make', '--no-update-notifier']);