@lalalic/markcut 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/bin/markcut +19 -0
  2. package/package.json +2 -2
package/bin/markcut ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import { dirname, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+ const entry = resolve(__dirname, "..", "src", "render", "cli.mjs");
9
+
10
+ const result = spawnSync(process.execPath, [entry, ...process.argv.slice(2)], {
11
+ stdio: "inherit",
12
+ });
13
+
14
+ if (result.error) {
15
+ console.error(result.error.message);
16
+ process.exit(1);
17
+ }
18
+
19
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@lalalic/markcut",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Markdown-to-video engine. Describe scenes in markdown, get a rendered video.",
5
5
  "bin": {
6
- "markcut": "./src/render/cli.mjs"
6
+ "markcut": "bin/markcut"
7
7
  },
8
8
  "type": "module",
9
9
  "main": "./src/entry.tsx",