🎥 Make videos programmatically with React
cool
Jonny Burger912654197abb
diff --git a/packages/cli/src/studio.ts b/packages/cli/src/studio.tsindex a151e3b221..7952bbbe42 100644--- a/packages/cli/src/studio.ts+++ b/packages/cli/src/studio.ts@@ -1,5 +1,4 @@import type {LogLevel} from '@remotion/renderer';-import {previewIndex} from '@remotion/studio';import {StudioInternals} from '@remotion/studio-server';import {ConfigInternals} from './config';import {getNumberOfSharedAudioTags} from './config/number-of-shared-audio-tags';@@ -84,7 +83,7 @@ export const studioCommand = async (ConfigInternals.getKeyboardShortcutsEnabled();await StudioInternals.startStudio({- previewEntry: previewIndex,+ previewEntry: require.resolve('@remotion/studio/entry'),browserArgs: parsedCli['browser-args'],browserFlag: parsedCli.browser,logLevel,diff --git a/packages/studio-server/src/start-studio.ts b/packages/studio-server/src/start-studio.tsindex 796fd2ad46..40255922ab 100644--- a/packages/studio-server/src/start-studio.ts+++ b/packages/studio-server/src/start-studio.ts@@ -4,6 +4,7 @@ import type {LogLevel} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';import crypto from 'node:crypto';import {existsSync} from 'node:fs';+import path from 'node:path';import {openBrowser} from './better-opn';import {getNetworkAddress} from './get-network-address';import type {QueueMethods} from './preview-server/api-types';@@ -129,7 +130,7 @@ export const startStudio = async ({});const {port, liveEventsServer} = await startServer({- entry: previewEntry,+ entry: path.resolve(previewEntry),userDefinedComponent: fullEntryPath,getCurrentInputProps,getEnvVariables,diff --git a/packages/studio/package.json b/packages/studio/package.jsonindex 262096f561..139c745b29 100644--- a/packages/studio/package.json+++ b/packages/studio/package.json@@ -1,56 +1,65 @@{- "name": "@remotion/studio",- "version": "4.0.88",- "description": "Remotion Editor",- "main": "dist",- "sideEffects": false,- "scripts": {- "lint": "eslint src --ext ts,tsx",- "watch": "tsc -w",- "build": "tsc -d",- "test": "vitest --run",- "formatting": "prettier src --check"- },- "author": "Jonny Burger <[email protected]>",- "contributors": [],- "license": "MIT",- "repository": {- "url": "https://github.com/remotion-dev/remotion"- },- "bugs": {- "url": "https://github.com/remotion-dev/remotion/issues"- },- "dependencies": {- "semver": "7.5.3",- "remotion": "workspace:*",- "@remotion/bundler": "workspace:*",- "@remotion/player": "workspace:*",- "@remotion/media-utils": "workspace:*",- "@remotion/renderer": "workspace:*",- "@remotion/studio-server": "workspace:*",- "memfs": "3.4.3",- "source-map": "0.7.3",- "open": "^8.4.2"- },- "devDependencies": {- "react": "18.2.0",- "react-dom": "18.2.0",- "@jonny/eslint-config": "3.0.276",- "@types/node": "18.14.6",- "@types/react": "18.0.26",- "@types/react-dom": "18.0.11",- "eslint": "8.42.0",- "eslint-plugin-10x": "1.5.2",- "eslint-plugin-react": "7.32.2",- "eslint-plugin-react-hooks": "4.4.0",- "prettier": "3.1.1",- "@types/semver": "^7.3.4",- "prettier-plugin-organize-imports": "3.2.4",- "vitest": "0.31.1",- "zod": "^3.22.3",- "@remotion/zod-types": "workspace:*"- },- "publishConfig": {- "access": "public"- }+ "name": "@remotion/studio",+ "version": "4.0.88",+ "description": "Remotion Editor",+ "main": "dist",+ "sideEffects": false,+ "scripts": {+ "lint": "eslint src --ext ts,tsx",+ "watch": "tsc -w",+ "build": "tsc -d",+ "test": "vitest --run",+ "formatting": "prettier src --check"+ },+ "author": "Jonny Burger <[email protected]>",+ "contributors": [],+ "license": "MIT",+ "repository": {+ "url": "https://github.com/remotion-dev/remotion"+ },+ "bugs": {+ "url": "https://github.com/remotion-dev/remotion/issues"+ },+ "dependencies": {+ "semver": "7.5.3",+ "remotion": "workspace:*",+ "@remotion/bundler": "workspace:*",+ "@remotion/player": "workspace:*",+ "@remotion/media-utils": "workspace:*",+ "@remotion/renderer": "workspace:*",+ "@remotion/studio-server": "workspace:*",+ "memfs": "3.4.3",+ "source-map": "0.7.3",+ "open": "^8.4.2"+ },+ "devDependencies": {+ "react": "18.2.0",+ "react-dom": "18.2.0",+ "@jonny/eslint-config": "3.0.276",+ "@types/node": "18.14.6",+ "@types/react": "18.0.26",+ "@types/react-dom": "18.0.11",+ "eslint": "8.42.0",+ "eslint-plugin-10x": "1.5.2",+ "eslint-plugin-react": "7.32.2",+ "eslint-plugin-react-hooks": "4.4.0",+ "prettier": "3.1.1",+ "@types/semver": "^7.3.4",+ "prettier-plugin-organize-imports": "3.2.4",+ "vitest": "0.31.1",+ "zod": "^3.22.3",+ "@remotion/zod-types": "workspace:*"+ },+ "publishConfig": {+ "access": "public"+ },+ "exports": {+ ".": {+ "import": "./dist/index.js",+ "require": "./dist/index.js",+ "types": "./dist/index.d.js"+ },+ "./package.json": "./package.json",+ "./entry": "./dist/previewEntry.js"+ }}diff --git a/packages/studio/src/index.ts b/packages/studio/src/index.tsindex 55f111bdcd..b331086932 100644--- a/packages/studio/src/index.ts+++ b/packages/studio/src/index.ts@@ -1,3 +1 @@-import path from "path";--export const previewIndex = path.resolve(__dirname, "previewEntry.js");+export {Studio} from './Studio';