@rokelamen/md2html 0.1.4 → 0.2.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
@@ -1,18 +1,55 @@
1
1
  # md2html
2
2
 
3
- A simple markdown-html conventer written in Typescript.
3
+ A simple markdown-html converter written in Typescript.
4
+
5
+ The style relies on browser pure style, inspired by [`txti`](https://txti.es/).
4
6
 
5
7
  ## Goal
6
8
 
7
9
  > I create this project for learning TS and node dev, not for the purpose of building another better markdown parse engine.
8
10
 
9
- Markdown syntax was first promoted with the release of `markdown.pl` by John Gruber. This leads to Markdown has no explicit definition, which means how markdown is parsed to HTML highly depends on the implementation of the tool. *And I choosed a simplest way(line-by-line parsing)*
11
+ Markdown syntax was first promoted with the release of `markdown.pl` by John Gruber. This leads to Markdown has no explicit definition, which means how markdown is parsed to HTML highly depends on the implementation of the tool. *And I choose a simplest way(line-by-line parsing)*
10
12
 
11
13
  To stay as close as possible to the 'Standard Markdown', [CommonMark](https://commonmark.org/) is a great reference.
12
14
 
13
- ## Development Log
15
+ ## Requirement
16
+
17
+ [Node](https://nodejs.org/) environment(>= v12.0.0) is necessary.
18
+
19
+ ## Installation
20
+
21
+ Using npm:
22
+
23
+ ```sh
24
+ npm i -g @rokelamen/md2html
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### As a command-line
30
+
31
+ ```sh
32
+ md2html [options] [input]
33
+ ```
34
+
35
+ 1. Parse from/to stdio
36
+
37
+ ```sh
38
+ md2html "# Markdown content" > index.html
39
+ ```
40
+
41
+ 2. Parse from/to file
42
+
43
+ ```sh
44
+ md2html -f input.md -o index.html
45
+ ```
46
+
47
+ ### As a library
14
48
 
15
- Why I choose to use [`rollup`](https://rollupjs.org/)?
49
+ ```javascript
50
+ import { parse } from '@rokelamen/md2html';
51
+ ```
16
52
 
17
- A: Every time I `import` a module, I have to add extension to the module file and it is probably a `.js` ranther than `.ts`. It's wired that I must `import` a future JS file. So I decided to use a build tool(`rollup` of course) to pack all files together, which eliminates all `import` statements.
53
+ ## Development
18
54
 
55
+ For development logs, please refer to the [Development Log](docs/development.md).