Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/canvas-capture/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dist/test/**
src
eslint.config.mjs
tsconfig.tsbuildinfo
*.tgz
.turbo
tsconfig.json
.prettierrc.js
bundle.ts
dist/cjs/test
7 changes: 7 additions & 0 deletions packages/canvas-capture/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @remotion/canvas-capture

Capture HTML-in-canvas content as a video

## Usage

This is an internal package and has no documentation.
35 changes: 35 additions & 0 deletions packages/canvas-capture/bundle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import path from 'path';
import {build} from 'bun';

if (process.env.NODE_ENV !== 'production') {
throw new Error('This script must be run using NODE_ENV=production');
}

console.time('Generated.');
const output = await build({
entrypoints: ['src/index.tsx'],
naming: '[name].mjs',
external: [
'mediabunny',
'remotion',
'remotion/no-react',
'react',
'react/jsx-runtime',
'react/jsx-dev-runtime',
'react-dom',
],
});

if (!output.success) {
console.log(output.logs.join('\n'));
process.exit(1);
}

for (const file of output.outputs) {
const str = await file.text();
const out = path.join('dist', 'esm', file.path);

await Bun.write(out, str);
}

console.timeEnd('Generated.');
7 changes: 7 additions & 0 deletions packages/canvas-capture/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {remotionFlatConfig} from '@remotion/eslint-config-internal';

const config = remotionFlatConfig({react: true});

export default {
...config,
};
55 changes: 55 additions & 0 deletions packages/canvas-capture/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"repository": {
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/canvas-capture"
},
"name": "@remotion/canvas-capture",
"version": "4.0.474",
"description": "Capture HTML-in-canvas content as a video",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/esm/index.mjs",
"type": "module",
"scripts": {
"formatting": "oxfmt src --check",
"format": "oxfmt src",
"lint": "eslint src",
"watch": "tsgo -w",
"make": "tsgo && bun --env-file=../.env.bundle bundle.ts"
},
"author": "Jonny Burger <jonny@remotion.dev>",
"contributors": [],
"license": "Remotion License",
"bugs": {
"url": "https://github.com/remotion-dev/remotion/issues"
},
"dependencies": {
"mediabunny": "catalog:",
"remotion": "workspace:*"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"module": "./dist/esm/index.mjs",
"import": "./dist/esm/index.mjs"
},
"./package.json": "./package.json"
},
"devDependencies": {
"react": "catalog:",
"react-dom": "catalog:",
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "catalog:",
"@typescript/native-preview": "catalog:"
},
"keywords": [
"remotion",
"canvas-capture"
],
"publishConfig": {
"access": "public"
}
}
Loading
Loading