@pruddiman/mdmirror 0.1.0 → 0.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.
Files changed (2) hide show
  1. package/README.md +68 -0
  2. package/package.json +2 -4
package/README.md CHANGED
@@ -1 +1,69 @@
1
1
  # mdmirror
2
+
3
+ Zero-config CLI that turns any folder of Markdown files into a browsable documentation site.
4
+
5
+ ```bash
6
+ npx @pruddiman/mdmirror ./docs
7
+ ```
8
+
9
+ Point it at a directory and it discovers every `.md` and `.txt` file, derives URL slugs from the folder structure, builds a hierarchical sidebar, renders Markdown to HTML with syntax highlighting and Mermaid diagrams, and wraps it all in a responsive theme — no config needed.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g @pruddiman/mdmirror
15
+ ```
16
+
17
+ Or run directly with npx:
18
+
19
+ ```bash
20
+ npx @pruddiman/mdmirror <path>
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ### Development server
26
+
27
+ ```bash
28
+ mdmirror <path> [--port <port>] [--host <host>]
29
+ ```
30
+
31
+ Starts a live-reloading server. Changes to any source file trigger an instant rebuild.
32
+
33
+ | Argument | Default | Description |
34
+ |----------|---------|-------------|
35
+ | `path` | required | Source folder containing `.md`/`.txt` files |
36
+ | `--port`, `-p` | `$PORT` or `3000` | Port to serve on |
37
+ | `--host` | `localhost` | Bind address |
38
+
39
+ ### Static build
40
+
41
+ ```bash
42
+ mdmirror build <path> [--output <dir>]
43
+ ```
44
+
45
+ Generates a self-contained static site for deployment to any static host.
46
+
47
+ | Argument | Default | Description |
48
+ |----------|---------|-------------|
49
+ | `path` | required | Source folder |
50
+ | `--output`, `-o` | `./dist` | Output directory |
51
+
52
+ ## Features
53
+
54
+ - **Zero config** — no config files, no frontmatter schema required
55
+ - **GFM** — tables, strikethrough, task lists, autolinks
56
+ - **Syntax highlighting** — via [Shiki](https://shiki.style)
57
+ - **Mermaid diagrams** — fenced code blocks with `mermaid` language tag
58
+ - **Full-text search** — client-side, no server required
59
+ - **Live reload** — WebSocket-based, instant on file save
60
+ - **Clean URLs** — slugs derived from directory structure, collisions auto-resolved
61
+ - **Self-contained output** — every HTML page is fully standalone
62
+
63
+ ## Requirements
64
+
65
+ Node.js >= 18.0.0
66
+
67
+ ## License
68
+
69
+ ISC
package/package.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "@pruddiman/mdmirror",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Zero-config CLI tool that turns any folder of markdown files into a browsable documentation site",
5
5
  "type": "module",
6
- "bin": {
7
- "mdmirror": "dist/cli/index.js"
8
- },
6
+ "bin": "dist/cli/index.js",
9
7
  "files": [
10
8
  "dist",
11
9
  "README.md"