@scrollframe/cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Javier Cornejo Leal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # @scrollframe/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Installs the `scrollframe` command.
4
+
5
+ ```bash
6
+ npx @scrollframe/cli hero.mp4
7
+ ```
8
+
9
+ See the [scrollframe documentation](https://github.com/JavierCornejoLeal/scrollframe#readme).
@@ -0,0 +1,344 @@
1
+ // src/options.ts
2
+ import { parseArgs } from "util";
3
+ import { posix, sep } from "path";
4
+ var HELP = `Usage: scrollframe <video> [options]
5
+
6
+ Extracts optimized WebP frames (mobile, tablet, desktop) and a manifest.json
7
+ for the @scrollframe/react <ScrollSequence> component.
8
+
9
+ Options:
10
+ -o, --out <dir> Output folder (default: public/sequence)
11
+ -b, --base-url <url> Public URL of the output folder (default: derived from --out)
12
+ -f, --frames <n> Frames to extract, 2-600, capped at the video's own (default: 120)
13
+ -q, --quality <0-100> WebP quality (default: 80)
14
+ -w, --widths <m,t,d> Mobile, tablet and desktop widths (default: 720,1280,1920)
15
+ --lossless Lossless WebP (much heavier, hurts LCP; not recommended)
16
+ --ffmpeg <path> ffmpeg binary (default: FFMPEG_PATH, bundled ffmpeg-static, then PATH)
17
+ --force Overwrite a non-empty output folder
18
+ -h, --help Show this help
19
+ `;
20
+ var UsageError = class extends Error {
21
+ name = "UsageError";
22
+ };
23
+ var BREAKPOINTS = [
24
+ { name: "mobile", maxViewportWidth: 767 },
25
+ { name: "tablet", maxViewportWidth: 1279 },
26
+ { name: "desktop", maxViewportWidth: null }
27
+ ];
28
+ function toInt(value, flag, min, max) {
29
+ const n = Number(value);
30
+ if (!Number.isInteger(n) || n < min || n > max) {
31
+ throw new UsageError(`${flag} must be an integer between ${min} and ${max} (got "${value}").`);
32
+ }
33
+ return n;
34
+ }
35
+ function deriveBaseUrl(out) {
36
+ const normalized = out.split(sep).join("/").replace(/^\.\//, "").replace(/\/+$/, "");
37
+ const match = normalized.match(/(?:^|\/)public\/(.+)$/);
38
+ if (match?.[1]) return `/${match[1]}`;
39
+ return `/${posix.basename(normalized)}`;
40
+ }
41
+ function parseCliArgs(argv) {
42
+ const { values, positionals } = parseArgs({
43
+ args: argv,
44
+ allowPositionals: true,
45
+ options: {
46
+ out: { type: "string", short: "o", default: "public/sequence" },
47
+ "base-url": { type: "string", short: "b" },
48
+ frames: { type: "string", short: "f", default: "120" },
49
+ quality: { type: "string", short: "q", default: "80" },
50
+ widths: { type: "string", short: "w", default: "720,1280,1920" },
51
+ lossless: { type: "boolean", default: false },
52
+ ffmpeg: { type: "string" },
53
+ force: { type: "boolean", default: false },
54
+ help: { type: "boolean", short: "h", default: false }
55
+ }
56
+ });
57
+ if (values.help) return "help";
58
+ const [input, ...extra] = positionals;
59
+ if (!input) throw new UsageError("Missing <video>. Run `scrollframe --help`.");
60
+ if (extra.length > 0) throw new UsageError(`Unexpected arguments: ${extra.join(" ")}`);
61
+ const widths = values.widths.split(",").map((w) => toInt(w.trim(), "--widths", 16, 7680));
62
+ if (widths.length !== 3) throw new UsageError("--widths needs exactly three values: mobile,tablet,desktop.");
63
+ if (!(widths[0] < widths[1] && widths[1] < widths[2])) {
64
+ throw new UsageError("--widths must be ascending: mobile < tablet < desktop.");
65
+ }
66
+ return {
67
+ input,
68
+ out: values.out,
69
+ baseUrl: values["base-url"] ?? deriveBaseUrl(values.out),
70
+ frames: toInt(values.frames, "--frames", 2, 600),
71
+ quality: toInt(values.quality, "--quality", 0, 100),
72
+ widths,
73
+ lossless: values.lossless,
74
+ ffmpeg: values.ffmpeg,
75
+ force: values.force
76
+ };
77
+ }
78
+ function parseDuration(ffmpegOutput) {
79
+ const match = ffmpegOutput.match(/Duration:\s*(\d+):(\d{2}):(\d{2}(?:\.\d+)?)/);
80
+ if (!match) return null;
81
+ const [, h, m, s] = match;
82
+ return Number(h) * 3600 + Number(m) * 60 + Number(s);
83
+ }
84
+ function parseFrameRate(ffmpegOutput) {
85
+ const match = ffmpegOutput.match(/Video:.*?(\d+(?:\.\d+)?) fps/);
86
+ return match ? Number(match[1]) : null;
87
+ }
88
+ function availableFrames(duration, rate) {
89
+ return rate === null ? Infinity : Math.round(duration * rate);
90
+ }
91
+ function samplingFps(frames, duration) {
92
+ if (duration <= 0) throw new UsageError("The video has no measurable duration.");
93
+ return frames / duration;
94
+ }
95
+ function planSets(widths) {
96
+ return BREAKPOINTS.map((bp, i) => ({ ...bp, width: widths[i], dir: bp.name }));
97
+ }
98
+ function buildManifest(options, frameCount, sets) {
99
+ return {
100
+ version: 1,
101
+ frameCount,
102
+ baseUrl: options.baseUrl,
103
+ pattern: "frame-{index}.webp",
104
+ padding: Math.max(4, String(frameCount - 1).length),
105
+ poster: "poster.webp",
106
+ sets
107
+ };
108
+ }
109
+
110
+ // src/generate.ts
111
+ import { spawn } from "child_process";
112
+ import { existsSync } from "fs";
113
+ import { copyFile, mkdir, mkdtemp, readdir, rename, rm, stat, writeFile } from "fs/promises";
114
+ import { createRequire } from "module";
115
+ import { tmpdir } from "os";
116
+ import { join } from "path";
117
+ import sharp from "sharp";
118
+ function run(bin, args) {
119
+ return new Promise((resolve, reject) => {
120
+ const child = spawn(bin, args, { stdio: ["ignore", "ignore", "pipe"] });
121
+ let stderr = "";
122
+ child.stderr.on("data", (chunk) => stderr += chunk.toString());
123
+ child.on("error", reject);
124
+ child.on("close", (code) => resolve({ code: code ?? 1, stderr }));
125
+ });
126
+ }
127
+ function bundledFfmpegPath() {
128
+ try {
129
+ return createRequire(import.meta.url)("ffmpeg-static") ?? null;
130
+ } catch {
131
+ return null;
132
+ }
133
+ }
134
+ function resolveFfmpeg(explicit) {
135
+ if (explicit) return explicit;
136
+ if (process.env.FFMPEG_PATH) return process.env.FFMPEG_PATH;
137
+ const bundled = bundledFfmpegPath();
138
+ if (bundled && existsSync(bundled)) return bundled;
139
+ return "ffmpeg";
140
+ }
141
+ function bundledBinaryMissing() {
142
+ const bundled = bundledFfmpegPath();
143
+ return bundled !== null && !existsSync(bundled);
144
+ }
145
+ function ffmpegNotFoundMessage(ffmpeg, bundledBinaryBlocked) {
146
+ if (!bundledBinaryBlocked) return `ffmpeg not found ("${ffmpeg}"). Install ffmpeg or pass --ffmpeg <path>.`;
147
+ return [
148
+ "ffmpeg not found. The ffmpeg bundled with scrollframe (ffmpeg-static) was not downloaded, usually because",
149
+ "its install script was blocked (npm 12+ blocks dependency install scripts by default). Fix it with one of:",
150
+ "",
151
+ " npx --allow-scripts=ffmpeg-static @scrollframe/cli <video>",
152
+ " npm install-scripts approve ffmpeg-static && npm rebuild ffmpeg-static (installed in a project)",
153
+ " install ffmpeg on your system, or pass --ffmpeg <path>"
154
+ ].join("\n");
155
+ }
156
+ var OWNED_ENTRIES = ["manifest.json", "mobile", "tablet", "desktop"];
157
+ async function checkOutput(out, force) {
158
+ if (existsSync(out) && !(await stat(out)).isDirectory()) {
159
+ throw new UsageError(`Output path is not a folder: ${out}`);
160
+ }
161
+ const entries = existsSync(out) ? await readdir(out) : [];
162
+ const owned = entries.filter((entry) => OWNED_ENTRIES.includes(entry));
163
+ if (owned.length > 0 && !force) {
164
+ throw new UsageError(`${out} already contains a sequence. Use --force to overwrite it.`);
165
+ }
166
+ return owned;
167
+ }
168
+ async function swapIntoPlace(out, staging, previous, fs = { rename, rm }) {
169
+ const backup = await mkdtemp(join(out, ".scrollframe-old-"));
170
+ const movedAside = [];
171
+ const movedIn = [];
172
+ try {
173
+ for (const entry of previous) {
174
+ await fs.rename(join(out, entry), join(backup, entry));
175
+ movedAside.push(entry);
176
+ }
177
+ for (const entry of (await readdir(staging)).sort()) {
178
+ await fs.rename(join(staging, entry), join(out, entry));
179
+ movedIn.push(entry);
180
+ }
181
+ } catch (error) {
182
+ let restored = true;
183
+ for (const entry of movedIn) {
184
+ try {
185
+ await fs.rm(join(out, entry), { recursive: true, force: true });
186
+ } catch {
187
+ restored = false;
188
+ }
189
+ }
190
+ for (const entry of movedAside) {
191
+ try {
192
+ await fs.rename(join(backup, entry), join(out, entry));
193
+ } catch {
194
+ restored = false;
195
+ }
196
+ }
197
+ if (!restored) {
198
+ throw new Error(
199
+ `Could not replace the sequence (${error.message}). The previous sequence is kept in ${backup}.`
200
+ );
201
+ }
202
+ await rm(backup, { recursive: true, force: true });
203
+ throw error;
204
+ }
205
+ await rm(backup, { recursive: true, force: true });
206
+ }
207
+ async function generateSequence(options, log = () => {
208
+ }) {
209
+ if (!existsSync(options.input)) throw new UsageError(`Video not found: ${options.input}`);
210
+ const ffmpeg = resolveFfmpeg(options.ffmpeg);
211
+ let probe;
212
+ try {
213
+ probe = await run(ffmpeg, ["-hide_banner", "-i", options.input]);
214
+ } catch {
215
+ const fellBack = !options.ffmpeg && !process.env.FFMPEG_PATH;
216
+ throw new UsageError(ffmpegNotFoundMessage(ffmpeg, fellBack && bundledBinaryMissing()));
217
+ }
218
+ const duration = parseDuration(probe.stderr);
219
+ if (duration === null) throw new UsageError(`Could not read the video duration of ${options.input}.`);
220
+ const rate = parseFrameRate(probe.stderr);
221
+ const available = availableFrames(duration, rate);
222
+ const frames = Math.min(options.frames, available);
223
+ if (frames < 2) throw new UsageError("The video produced fewer than 2 frames.");
224
+ if (frames < options.frames) {
225
+ log(`The video only has ${frames} frames; extracting ${frames} instead of ${options.frames}.`);
226
+ }
227
+ const previous = await checkOutput(options.out, options.force);
228
+ await mkdir(options.out, { recursive: true });
229
+ const tmp = await mkdtemp(join(tmpdir(), "scrollframe-"));
230
+ const staging = await mkdtemp(join(options.out, ".scrollframe-new-"));
231
+ try {
232
+ const plan = planSets(options.widths);
233
+ const largest = plan[plan.length - 1].width;
234
+ const fps = samplingFps(frames, duration);
235
+ log(`Extracting ${frames} frames from ${duration.toFixed(2)}s of video...`);
236
+ const extract = await run(ffmpeg, [
237
+ "-hide_banner",
238
+ "-loglevel",
239
+ "error",
240
+ "-i",
241
+ options.input,
242
+ "-vf",
243
+ `fps=${fps},scale='min(${largest},iw)':-2:flags=lanczos`,
244
+ "-frames:v",
245
+ String(frames),
246
+ join(tmp, "%06d.png")
247
+ ]);
248
+ if (extract.code !== 0) throw new Error(`ffmpeg failed:
249
+ ${extract.stderr}`);
250
+ const sources = (await readdir(tmp)).filter((f) => f.endsWith(".png")).sort();
251
+ if (sources.length < 2) throw new UsageError("The video produced fewer than 2 frames.");
252
+ const manifestBase = buildManifest(options, sources.length, []);
253
+ const sets = [];
254
+ const bytesBySet = {};
255
+ const webp = options.lossless ? { lossless: true, effort: 6 } : { quality: options.quality, effort: 6, smartSubsample: true };
256
+ for (const set of plan) {
257
+ const dir = join(staging, set.dir);
258
+ await mkdir(dir, { recursive: true });
259
+ let size = { width: set.width, height: 0 };
260
+ let bytes = 0;
261
+ for (const [index, source] of sources.entries()) {
262
+ const file = manifestBase.pattern.replace("{index}", String(index).padStart(manifestBase.padding, "0"));
263
+ const info = await sharp(join(tmp, source)).resize({ width: set.width, withoutEnlargement: true }).webp(webp).toFile(join(dir, file));
264
+ if (index === 0) {
265
+ size = { width: info.width, height: info.height };
266
+ await copyFile(join(dir, file), join(dir, manifestBase.poster));
267
+ }
268
+ bytes += info.size;
269
+ }
270
+ sets.push({ ...set, ...size });
271
+ bytesBySet[set.name] = bytes;
272
+ log(` ${set.name.padEnd(8)} ${size.width}x${size.height} ${(bytes / 1024 / 1024).toFixed(1)} MB`);
273
+ }
274
+ const manifest = buildManifest(options, sources.length, sets);
275
+ await writeFile(join(staging, "manifest.json"), `${JSON.stringify(manifest, null, 2)}
276
+ `);
277
+ await swapIntoPlace(options.out, staging, previous);
278
+ return { manifest, manifestPath: join(options.out, "manifest.json"), bytesBySet };
279
+ } finally {
280
+ await rm(tmp, { recursive: true, force: true });
281
+ await rm(staging, { recursive: true, force: true });
282
+ }
283
+ }
284
+
285
+ // src/run.ts
286
+ async function runCli(argv, io) {
287
+ let options;
288
+ try {
289
+ options = parseCliArgs(argv);
290
+ } catch (error) {
291
+ io.stderr.write(`${error.message}
292
+
293
+ ${HELP}`);
294
+ return 2;
295
+ }
296
+ if (options === "help") {
297
+ io.stdout.write(HELP);
298
+ return 0;
299
+ }
300
+ if (options.lossless) {
301
+ io.stderr.write("Warning: --lossless frames are several times heavier and will hurt LCP.\n");
302
+ }
303
+ try {
304
+ const { manifestPath, manifest } = await generateSequence(options, (line) => io.stdout.write(`${line}
305
+ `));
306
+ io.stdout.write(`
307
+ Done: ${manifest.frameCount} frames -> ${manifestPath}
308
+
309
+ `);
310
+ io.stdout.write(
311
+ `import manifest from "./${manifestPath}";
312
+ <ScrollSequence manifest={manifest} alt="Describe the scene" />
313
+ `
314
+ );
315
+ return 0;
316
+ } catch (error) {
317
+ if (error instanceof UsageError) {
318
+ io.stderr.write(`${error.message}
319
+ `);
320
+ return 2;
321
+ }
322
+ io.stderr.write(`Unexpected error: ${error.message}
323
+ `);
324
+ return 1;
325
+ }
326
+ }
327
+
328
+ export {
329
+ HELP,
330
+ UsageError,
331
+ deriveBaseUrl,
332
+ parseCliArgs,
333
+ parseDuration,
334
+ parseFrameRate,
335
+ availableFrames,
336
+ samplingFps,
337
+ planSets,
338
+ buildManifest,
339
+ resolveFfmpeg,
340
+ ffmpegNotFoundMessage,
341
+ swapIntoPlace,
342
+ generateSequence,
343
+ runCli
344
+ };
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ runCli
4
+ } from "./chunk-SMHO5GNI.js";
5
+
6
+ // src/cli.ts
7
+ runCli(process.argv.slice(2), process).then((code) => {
8
+ process.exitCode = code;
9
+ });
@@ -0,0 +1,70 @@
1
+ import { rename, rm } from 'node:fs/promises';
2
+ import { FrameSet, SequenceManifest } from '@scrollframe/core';
3
+
4
+ interface CliIO {
5
+ stdout: {
6
+ write(chunk: string): unknown;
7
+ };
8
+ stderr: {
9
+ write(chunk: string): unknown;
10
+ };
11
+ }
12
+ /** Runs the CLI and resolves with the exit code: 0 ok, 1 unexpected failure, 2 usage error. */
13
+ declare function runCli(argv: string[], io: CliIO): Promise<number>;
14
+
15
+ declare const HELP = "Usage: scrollframe <video> [options]\n\nExtracts optimized WebP frames (mobile, tablet, desktop) and a manifest.json\nfor the @scrollframe/react <ScrollSequence> component.\n\nOptions:\n -o, --out <dir> Output folder (default: public/sequence)\n -b, --base-url <url> Public URL of the output folder (default: derived from --out)\n -f, --frames <n> Frames to extract, 2-600, capped at the video's own (default: 120)\n -q, --quality <0-100> WebP quality (default: 80)\n -w, --widths <m,t,d> Mobile, tablet and desktop widths (default: 720,1280,1920)\n --lossless Lossless WebP (much heavier, hurts LCP; not recommended)\n --ffmpeg <path> ffmpeg binary (default: FFMPEG_PATH, bundled ffmpeg-static, then PATH)\n --force Overwrite a non-empty output folder\n -h, --help Show this help\n";
16
+ interface GenerateOptions {
17
+ input: string;
18
+ out: string;
19
+ baseUrl: string;
20
+ frames: number;
21
+ quality: number;
22
+ widths: [number, number, number];
23
+ lossless: boolean;
24
+ ffmpeg?: string;
25
+ force: boolean;
26
+ }
27
+ declare class UsageError extends Error {
28
+ name: string;
29
+ }
30
+ /** `public/sequence` -> `/sequence`; any other folder -> `/<last segment>`. */
31
+ declare function deriveBaseUrl(out: string): string;
32
+ declare function parseCliArgs(argv: string[]): GenerateOptions | "help";
33
+ /** Parses the `Duration: HH:MM:SS.xx` line of `ffmpeg -i` output, in seconds. */
34
+ declare function parseDuration(ffmpegOutput: string): number | null;
35
+ /** Parses the frame rate of the first video stream (`..., 30 fps, ...`), or null when absent. */
36
+ declare function parseFrameRate(ffmpegOutput: string): number | null;
37
+ /**
38
+ * Frames the source can provide. ffmpeg prints rounded rates (29.97 for 30000/1001), so the
39
+ * product is rounded rather than truncated: 4 s at "29.97 fps" is 120 frames, not 119.
40
+ */
41
+ declare function availableFrames(duration: number, rate: number | null): number;
42
+ /** Frame rate that yields `frames` evenly spaced frames over `duration` seconds. */
43
+ declare function samplingFps(frames: number, duration: number): number;
44
+ declare function planSets(widths: [number, number, number]): Omit<FrameSet, "height">[];
45
+ declare function buildManifest(options: Pick<GenerateOptions, "baseUrl">, frameCount: number, sets: FrameSet[]): SequenceManifest;
46
+
47
+ interface GenerateResult {
48
+ manifest: SequenceManifest;
49
+ manifestPath: string;
50
+ bytesBySet: Record<string, number>;
51
+ }
52
+ type Log = (message: string) => void;
53
+ /** --ffmpeg flag, then FFMPEG_PATH, then the bundled ffmpeg-static binary, then `ffmpeg` on PATH. */
54
+ declare function resolveFfmpeg(explicit?: string): string;
55
+ declare function ffmpegNotFoundMessage(ffmpeg: string, bundledBinaryBlocked: boolean): string;
56
+ interface SwapFs {
57
+ rename: typeof rename;
58
+ rm: typeof rm;
59
+ }
60
+ /**
61
+ * Moves a fully generated staging folder into `out`. The previous sequence is first moved
62
+ * aside (same filesystem, so renames are atomic) and restored if any step fails.
63
+ * Only scrollframe-owned entries are touched; unrelated files in `out` are never removed.
64
+ * The backup is deleted only once the swap or the full restore has succeeded; if the
65
+ * restore itself fails (e.g. EBUSY/EPERM on Windows), it is kept and its path reported.
66
+ */
67
+ declare function swapIntoPlace(out: string, staging: string, previous: string[], fs?: SwapFs): Promise<void>;
68
+ declare function generateSequence(options: GenerateOptions, log?: Log): Promise<GenerateResult>;
69
+
70
+ export { type CliIO, type GenerateOptions, type GenerateResult, HELP, type SwapFs, UsageError, availableFrames, buildManifest, deriveBaseUrl, ffmpegNotFoundMessage, generateSequence, parseCliArgs, parseDuration, parseFrameRate, planSets, resolveFfmpeg, runCli, samplingFps, swapIntoPlace };
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
1
+ import {
2
+ HELP,
3
+ UsageError,
4
+ availableFrames,
5
+ buildManifest,
6
+ deriveBaseUrl,
7
+ ffmpegNotFoundMessage,
8
+ generateSequence,
9
+ parseCliArgs,
10
+ parseDuration,
11
+ parseFrameRate,
12
+ planSets,
13
+ resolveFfmpeg,
14
+ runCli,
15
+ samplingFps,
16
+ swapIntoPlace
17
+ } from "./chunk-SMHO5GNI.js";
18
+ export {
19
+ HELP,
20
+ UsageError,
21
+ availableFrames,
22
+ buildManifest,
23
+ deriveBaseUrl,
24
+ ffmpegNotFoundMessage,
25
+ generateSequence,
26
+ parseCliArgs,
27
+ parseDuration,
28
+ parseFrameRate,
29
+ planSets,
30
+ resolveFfmpeg,
31
+ runCli,
32
+ samplingFps,
33
+ swapIntoPlace
34
+ };
package/package.json CHANGED
@@ -1,6 +1,50 @@
1
1
  {
2
2
  "name": "@scrollframe/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "Turn a video into an optimized, SEO-friendly scroll storytelling sequence with one command.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/JavierCornejoLeal/scrollframe.git",
9
+ "directory": "packages/cli"
10
+ },
11
+ "homepage": "https://github.com/JavierCornejoLeal/scrollframe#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/JavierCornejoLeal/scrollframe/issues"
14
+ },
15
+ "type": "module",
16
+ "bin": {
17
+ "scrollframe": "./dist/cli.js"
18
+ },
19
+ "main": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "default": "./dist/index.js"
25
+ }
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "engines": {
31
+ "node": ">=20"
32
+ },
33
+ "keywords": [
34
+ "scroll",
35
+ "scrollytelling",
36
+ "video",
37
+ "frames",
38
+ "webp",
39
+ "cli"
40
+ ],
41
+ "dependencies": {
42
+ "ffmpeg-static": "^5.2.0",
43
+ "sharp": "^0.34.0",
44
+ "@scrollframe/core": "^0.2.0"
45
+ },
46
+ "scripts": {
47
+ "build": "tsup src/index.ts src/cli.ts --format esm --dts --clean --target node20",
48
+ "typecheck": "tsc --noEmit -p ."
49
+ }
6
50
  }