You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+91-18Lines changed: 91 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,46 @@
2
2
3
3
> Develop and demo your Svelte components in your README.md.
4
4
5
-
The purpose of this project is to minimize additional set-up by using the README.md for component documentation and development.
5
+
## Readme Driven Development
6
6
7
-
It preprocesses the README.md using [Markdown It](https://github.com/markdown-it/markdown-it) and makes code within `svelte` code fence blocks into runnnable code. The code fence block is preserved and highlighted with [PrismJS](https://github.com/PrismJS/prism).
7
+
This project embraces the concept of [Readme Driven Development](https://tom.preston-werner.com/2010/08/23/readme-driven-development.html) (RDD) – or more generally, documentation driven development.
8
8
9
-
[GitHub Markdown CSS](https://github.com/sindresorhus/github-markdown-css) is used for styling.
9
+
This module enables the `README.md` to be used for:
10
+
11
+
- developing a Svelte component
12
+
- demoing a Svelte component
13
+
- documentation
14
+
- installation
15
+
- usage
16
+
- API
17
+
- metadata
18
+
- links to Changelog, License etc.
19
+
20
+
## How it works
21
+
22
+
At its core, this library is a simple Svelte preprocessor.
23
+
24
+
1. Use the `svelte` entry defined in your project `package.json`
25
+
2. Use `README.md` as the Svelte source code
26
+
3. Parse Markdown using [Markdown It](https://github.com/markdown-it/markdown-it)
27
+
4. Run code within `svelte` code fence blocks so that demos are juxtaposed with code
28
+
29
+
[GitHub Markdown CSS](https://github.com/sindresorhus/github-markdown-css) is used for styling to maintain a consistent style with [github.com](https://github.com/).
0 commit comments