@v1hz/md2docx 1.0.4 → 1.0.5
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/package.json +1 -1
- package/src/index.ts +2 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
|
-
import { mkdirSync, writeFileSync } from "fs";
|
|
3
|
+
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
4
4
|
import { dirname, parse, resolve } from "path";
|
|
5
5
|
import { $ } from "bun";
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ export async function run(args: string[]): Promise<number> {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const mdPath = resolve(cli.mdPath!);
|
|
36
|
-
if (!(
|
|
36
|
+
if (!existsSync(mdPath)) throw new Error(`找不到 Markdown 文件:${mdPath}`);
|
|
37
37
|
|
|
38
38
|
const config = await loadConfig(cli.configPath ?? CONFIG_PATH);
|
|
39
39
|
const cfg = applyConfigOverrides(config, cli.overrides);
|