@mryhryki/markdown-preview 0.6.0 → 0.6.2

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
@@ -2,16 +2,26 @@
2
2
 
3
3
  Markdown realtime preview on browser with your favorite editor.
4
4
 
5
+ ## Concept
6
+
7
+ - Execute immediately with [npx](#npx).
8
+ - Offline support if [installed](#npm--yarn-install).
9
+ - [You can create your own template easily.](#2-how-to-create-a-template-file)
10
+
5
11
  ## Demo
6
12
 
7
- https://github.com/mryhryki/markdown-preview/assets/12733897/86d27eaa-8b69-48a4-82a5-04f5602925f6
13
+ <video
14
+ style="max-width: 100%; object-fit: contain;"
15
+ src="https://github.com/mryhryki/markdown-preview/assets/12733897/8c7afd39-4d02-4e9a-b84f-863f11630e6b"
16
+ controls></video>
8
17
 
9
18
  ## Usage
10
19
 
11
20
  ### npx
12
21
 
13
22
  ```shell
14
- $ npx @mryhryki/markdown-preview --file README.md --template default --port 34567 --log-level info --no-opener
23
+ $ npx @mryhryki/markdown-preview
24
+ Version : v0.6.0
15
25
  Root Directory : /current/dir
16
26
  Default File : README.md
17
27
  Extensions : md, markdown
@@ -19,14 +29,15 @@ Template File : /path/to/template/default.html
19
29
  Preview URL : http://localhost:34567
20
30
  ```
21
31
 
22
- ### npm / yarn
32
+ ### npm / yarn (install)
23
33
 
24
34
  ```shell
25
35
  $ npm install -g @mryhryki/markdown-preview
26
36
  # or
27
37
  $ yarn install -g @mryhryki/markdown-preview
28
38
 
29
- $ markdown-preview --file README.md --template default-dark --port 34567 --log-level info --no-opener
39
+ $ markdown-preview
40
+ Version : v0.6.0
30
41
  Root Directory : /current/dir
31
42
  Default File : README.md
32
43
  Extensions : md, markdown
@@ -36,15 +47,16 @@ Preview URL : http://localhost:34567
36
47
 
37
48
  ## Parameter
38
49
 
39
- | short | long | environment variable | parameter | required | default |
40
- |-------|-------------|----------------------------|-------------------------------------------------------|----------|-----------|
41
- | -f | --file | MARKDOWN_PREVIEW_FILE | ***relative*** file path | no | README.md |
42
- | -t | --template | MARKDOWN_PREVIEW_TEMPLATE | defined template name (*1) or template file path (*2) | no | default |
43
- | -p | --port | MARKDOWN_PREVIEW_PORT | port number | no | 34567 |
44
- | | --log-level | MARKDOWN_PREVIEW_LOG_LEVEL | trace, debug, info<br>warn, error, fatal | no | info |
45
- | | --no-opener | MARKDOWN_PREVIEW_NO_OPENER | true (only env var) | no | |
46
- | -v | --version | | | no | |
47
- | -h | --help | | | no | |
50
+ | short | long | environment variable | parameter | required | default |
51
+ |-------|--------------|-----------------------------|-------------------------------------------------------|----------|-------------|
52
+ | -f | --file | MARKDOWN_PREVIEW_FILE | ***relative*** file path | no | README.md |
53
+ | -e | --extensions | MARKDOWN_PREVIEW_EXTENSIONS | comma separated extensions | no | md,markdown |
54
+ | -t | --template | MARKDOWN_PREVIEW_TEMPLATE | defined template name (*1) or template file path (*2) | no | default |
55
+ | -p | --port | MARKDOWN_PREVIEW_PORT | port number | no | 34567 |
56
+ | | --log-level | MARKDOWN_PREVIEW_LOG_LEVEL | trace, debug, info<br>warn, error, fatal | no | info |
57
+ | | --no-opener | MARKDOWN_PREVIEW_NO_OPENER | true (only env var) | no | |
58
+ | -v | --version | | | no | |
59
+ | -h | --help | | | no | |
48
60
 
49
61
  ### *1: Defined Template Names
50
62
 
@@ -52,10 +64,9 @@ Preview URL : http://localhost:34567
52
64
 
53
65
  ### *2: How to create a template file
54
66
 
55
- Creating a template file is easy.
56
- At a minimum, all you need to do is load `/markdown-preview-websocket.js` and pass a callback function with the necessary processing to `connectMarkdownPreview`.
67
+ You just need to load `/markdown-preview-websocket.js` and register a callback to `connectMarkdownPreview`.
57
68
 
58
- Sample code is presented below.
69
+ A simple example code is below:
59
70
 
60
71
  ```html
61
72
  <!doctype html>
@@ -101,3 +112,7 @@ $ npm run lint
101
112
  # Formatter
102
113
  $ npm run fmt
103
114
  ```
115
+
116
+ ## Release
117
+
118
+ Run [release](https://github.com/mryhryki/markdown-preview/actions/workflows/release.yaml) workflow.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mryhryki/markdown-preview",
3
3
  "description": "Markdown realtime preview on browser with your favorite editor",
4
- "version": "0.6.0",
4
+ "version": "0.6.2",
5
5
  "author": "mryhryki",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
@@ -47,7 +47,7 @@
47
47
  "log4js": "^6.9.1",
48
48
  "opener": "^1.5.2",
49
49
  "serve-index": "^1.9.1",
50
- "ws": "^8.16.0"
50
+ "ws": "^8.17.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/express": "^4.17.21",
@@ -56,23 +56,23 @@
56
56
  "@types/opener": "^1.4.3",
57
57
  "@types/serve-index": "^1.9.4",
58
58
  "emojilib": "^3.0.12",
59
- "esbuild": "^0.21.1",
59
+ "esbuild": "^0.21.3",
60
60
  "eslint": "^8.57.0",
61
61
  "eslint-config-prettier": "^9.1.0",
62
- "eslint-plugin-jest": "^28.2.0",
62
+ "eslint-plugin-jest": "^28.5.0",
63
63
  "eslint-plugin-node": "^11.1.0",
64
64
  "eslint-plugin-prettier": "^5.1.3",
65
65
  "eslint-plugin-react": "^7.34.1",
66
- "eslint-plugin-react-hooks": "^4.6.0",
66
+ "eslint-plugin-react-hooks": "^4.6.2",
67
67
  "eslint-plugin-simple-import-sort": "^12.1.0",
68
- "eslint-plugin-unused-imports": "^3.1.0",
68
+ "eslint-plugin-unused-imports": "^3.2.0",
69
69
  "github-markdown-css": "^5.5.1",
70
70
  "highlight.js": "^11.9.0",
71
71
  "jest": "^29.7.0",
72
72
  "marked": "^12.0.2",
73
73
  "marked-emoji": "^1.4.0",
74
74
  "marked-highlight": "^2.1.1",
75
- "mermaid": "^10.9.0",
75
+ "mermaid": "^10.9.1",
76
76
  "nodemon": "^3.1.0",
77
77
  "ts-jest": "^29.1.2",
78
78
  "typescript": "^5.4.5"