Skip to content

🎥 Make videos programmatically with React

bundling working

Matt Mcgillivraycdf9067ffe25
diff --git a/packages/gcp/package.json b/packages/gcp/package.json
index f914a6eb89..f4077a7814 100644
--- a/packages/gcp/package.json
+++ b/packages/gcp/package.json
@@ -7,6 +7,7 @@
"build": "tsc",
"start": "functions-framework --target=TypescriptFunction",
"prestart": "pnpm run build",
+ "buildlambda": "ts-node src/bundle-lambda.ts",
"gcp-build": "npm run build"
},
"dependencies": {
@@ -19,6 +20,7 @@
"prettier-plugin-organize-imports": "^3.2.2",
"typescript": "^4.7.0",
"@remotion/compositor-linux-x64-musl": "3.3.36",
- "zip-lib": "^0.7.2"
+ "zip-lib": "^0.7.2",
+ "ts-node": "^10.8.0"
}
}
diff --git a/packages/gcp/src/bundle-lambda.ts b/packages/gcp/src/bundle-lambda.ts
index e7b5f9602e..60830b753e 100644
--- a/packages/gcp/src/bundle-lambda.ts
+++ b/packages/gcp/src/bundle-lambda.ts
@@ -5,7 +5,7 @@ import path from 'path';
import zl = require('zip-lib');
const bundleLambda = async () => {
- const outdir = path.join(__dirname, '..', `build-render`);
+ const outdir = path.join(__dirname, '..', `dist`);
fs.mkdirSync(outdir, {
recursive: true,
});
@@ -30,10 +30,6 @@ const bundleLambda = async () => {
const compositorFile = `${outdir}/compositor`;
fs.copyFileSync(x64BinaryPath, compositorFile);
- await zl.archiveFolder(outdir, 'gcp.zip');
-
- fs.unlinkSync(compositorFile);
- fs.unlinkSync(outfile);
};
bundleLambda()
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 756f6980e3..e5775b9667 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -542,6 +542,7 @@ importers:
'@remotion/renderer': 3.3.36
prettier-plugin-organize-imports: ^3.2.2
remotion: 3.3.36
+ ts-node: ^10.8.0
typescript: ^4.7.0
zip-lib: ^0.7.2
dependencies:
@@ -552,6 +553,7 @@ importers:
devDependencies:
'@remotion/compositor-linux-x64-musl': link:../compositor-linux-x64-musl
prettier-plugin-organize-imports: 3.2.2_j2odc4yr77iddtreafyicbq5hi
+ ts-node: 10.8.0_vnj66vw6pmisrnpmmxy72mdbpa
typescript: 4.7.2
zip-lib: 0.7.2
@@ -21172,7 +21174,7 @@ packages:
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
'@types/node': 18.11.2
- acorn: 8.8.0
+ acorn: 8.8.1
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
@@ -21203,7 +21205,7 @@ packages:
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
'@types/node': 14.17.20
- acorn: 8.8.0
+ acorn: 8.8.1
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1