serve-my-md 1.1.0 → 1.1.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.
package/README.md CHANGED
@@ -4,7 +4,7 @@ A tiny CLI to generate a static docs website from markdown files.
4
4
 
5
5
  ## Documentation
6
6
 
7
- Full docs are at [https://ashishantil.dev/serve-my-md](https://ashishantil.dev/serve-my-md).
7
+ Full docs are at [https://serve-my-md.ashishantil.dev](https://serve-my-md.ashishantil.dev).
8
8
 
9
9
  ## Basic usage
10
10
 
package/bin/index.js CHANGED
@@ -382,7 +382,7 @@ md.linkify.set({ fuzzyEmail: false });
382
382
  var mdParser = md;
383
383
 
384
384
  // cli/src/core/build.ts
385
- import { cp, rm, writeFile } from "fs/promises";
385
+ import { cp, readdir as readdir2, rm, writeFile } from "fs/promises";
386
386
  import path3, { resolve } from "path";
387
387
  import { fileURLToPath } from "url";
388
388
  import { build as viteBuild } from "vite";
@@ -445,6 +445,13 @@ async function build(options2) {
445
445
  await writeFile(path3.join(webDir, "index.html"), await generateHtml());
446
446
  Logger.log("Generated HTML from template");
447
447
  if (!skipBuild) {
448
+ const entries = await readdir2(path3.join(webDir, PUBLIC_DIRNAME));
449
+ for (const entry of entries) {
450
+ await rm(path3.join(webDir, PUBLIC_DIRNAME, entry), {
451
+ recursive: true,
452
+ force: true
453
+ });
454
+ }
448
455
  if (finalConfig.publicPath) {
449
456
  if (await FileOrDirectoryExists(
450
457
  path3.join(options2.directory, finalConfig.publicPath)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serve-my-md",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "Generate beautiful SEO-friendly static websites from Markdown files.",
6
6
  "repository": {