mdts 0.4.3 → 0.4.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/README.md +31 -61
- package/dist/frontend/bundle.js +134 -68
- package/dist/frontend/index.html +1 -2
- package/dist/server/public/welcome.md +1 -1
- package/dist/server/server.js +63 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,86 +2,56 @@
|
|
|
2
2
|
<img src="docs/logo.svg" alt="mdts" width="400">
|
|
3
3
|
</h1>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**A zero-config CLI tool to preview your local Markdown files in a browser.** **`npx mdts` — and you're done.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="docs/screen_animation.gif" width="600" alt="mdts demo">
|
|
9
|
+
</p>
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- **Markdown Rendering**: Renders Markdown files in a clean, readable format.
|
|
11
|
-
- **Live Reload**: Automatically reloads the page in the browser when Markdown files are changed on disk.
|
|
11
|
+
## 🔧 Features
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- ⚡ **Instant Markdown Preview** – Run and view in seconds
|
|
14
|
+
- 🌐 **Web UI** – Clean, tree-based browser interface
|
|
15
|
+
- 🔄 **Live Reload** – Automatically refreshes on file changes
|
|
16
|
+
- 🧘 **Zero Setup** – No config, no install, no nonsense
|
|
14
17
|
|
|
15
18
|
|
|
16
|
-
##
|
|
19
|
+
## 🚀 Quick Start
|
|
20
|
+
|
|
17
21
|
```bash
|
|
18
22
|
npx mdts
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
This starts a local server at http://localhost:8521 and opens your browser.
|
|
26
|
+
Your current directory becomes a browsable Markdown tree.
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
## 💡 Use Cases
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
- Reviewing AI-generated docs
|
|
31
|
+
- Quickly checking README or note folders
|
|
32
|
+
- Lightweight local Markdown wiki
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
- `[directory]`: Specify the directory to serve (default: current directory `.`)
|
|
34
|
+
## 🖼 Screenshot
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
> Browsable file tree + rendered Markdown with live reload
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="docs/screenshot.png" width="800" alt="mdts screenshot">
|
|
40
|
+
</p>
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
npx mdts docs -p 3000
|
|
36
|
-
```
|
|
42
|
+
## 📦 Requirements
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- **AI-powered documentation workflow:**
|
|
42
|
-
Leverage AI tools to generate or refine your documentation. As the AI produces content, use `mdts` to instantly preview the generated Markdown files locally. This allows for a rapid feedback loop, enabling you to review, edit, and iterate on AI-generated documentation in real-time within your browser, ensuring accuracy and adherence to your project's style before committing changes.
|
|
43
|
-
```bash
|
|
44
|
-
# Assuming your AI-generated docs are in a 'docs-ai' directory
|
|
45
|
-
npx mdts docs-ai
|
|
46
|
-
```
|
|
47
|
-
This setup provides a seamless way to integrate AI into your documentation pipeline, making the process of creating and maintaining comprehensive project documentation more efficient.
|
|
48
|
-
|
|
49
|
-
- **Exploring a new project's documentation:**
|
|
50
|
-
When joining a new project, you often need to quickly understand its structure and documentation. Running `mdts` at the project root can give you an immediate overview of all Markdown-based documentation (e.g., `README.md`, `CONTRIBUTING.md`, `docs/`).
|
|
51
|
-
```bash
|
|
52
|
-
# Navigate to your new project's root directory
|
|
53
|
-
cd /path/to/new-project
|
|
54
|
-
npx mdts .
|
|
55
|
-
```
|
|
56
|
-
This provides a convenient way to browse all project-related Markdown files without opening them individually in a text editor.
|
|
57
|
-
|
|
58
|
-
- **Browsing a collection of Markdown notes/documents:**
|
|
59
|
-
If you have a repository where you collect Markdown files exported from various sources (e.g., Notion, Evernote, Confluence), `mdts` can help you browse them easily.
|
|
60
|
-
```bash
|
|
61
|
-
npx mdts ~/my-markdown-collection
|
|
62
|
-
```
|
|
63
|
-
This will serve all Markdown files in `~/my-markdown-collection` and its subdirectories, allowing you to navigate through them in your browser.
|
|
64
|
-
|
|
65
|
-
- **Reviewing `README` files of installed `node_modules`:**
|
|
66
|
-
Sometimes you might want to quickly check the `README.md` of a library installed in your `node_modules` directory to understand its usage or features.
|
|
67
|
-
```bash
|
|
68
|
-
npx mdts node_modules
|
|
69
|
-
```
|
|
70
|
-
This will serve the `node_modules` directory, allowing you to browse the `README.md` files of your installed packages directly in your browser.
|
|
71
|
-
|
|
72
|
-
## Development
|
|
73
|
-
|
|
74
|
-
To build the project:
|
|
44
|
+
- Node.js
|
|
45
|
+
- No installation needed – uses `npx`
|
|
75
46
|
|
|
76
|
-
|
|
77
|
-
npm run build & npm run build:frontend
|
|
78
|
-
```
|
|
47
|
+
## 🛠 Options
|
|
79
48
|
|
|
80
|
-
To start the server:
|
|
81
49
|
```bash
|
|
82
|
-
|
|
50
|
+
npx mdts <directory> --port 3000
|
|
83
51
|
```
|
|
84
52
|
|
|
85
|
-
|
|
53
|
+
| Option | Description | Example |
|
|
54
|
+
| -------------- | ------------------------------------- | --------|
|
|
55
|
+
| `<directory>` | Specify root directory (default .) | ./docs |
|
|
56
|
+
| `--port` | Change the server port (default 8521) | 8000 |
|
|
86
57
|
|
|
87
|
-
This project is licensed under the MIT License. See the `LICENSE` file for details.
|