markdown-up 1.7.2 → 1.7.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 +46 -27
- package/lib/app.js +333 -227
- package/lib/barChart.js +8 -6
- package/lib/csv.js +9 -0
- package/lib/data.js +44 -41
- package/lib/dataTable.js +8 -6
- package/lib/lineChart.js +10 -7
- package/lib/model.js +5 -11
- package/lib/script.js +329 -251
- package/lib/scriptLibrary.js +441 -0
- package/lib/util.js +8 -39
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,58 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MarkdownUp
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/markdown-up)
|
|
4
4
|
[](https://github.com/craigahobbs/markdown-up/blob/main/LICENSE)
|
|
5
5
|
|
|
6
|
-
[
|
|
6
|
+
[MarkdownUp](https://craigahobbs.github.io/markdown-up/)
|
|
7
|
+
is a Markdown viewer.
|
|
7
8
|
|
|
8
|
-
**markdown-up** is a JavaScript application that renders Markdown files in your web browser. To use markdown-up, first,
|
|
9
|
-
download the markdown-up application stub to the directory containing your Markdown files:
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
curl -O https://craigahobbs.github.io/markdown-up/static/index.html
|
|
13
|
-
```
|
|
10
|
+
## View Local Markdown Files
|
|
14
11
|
|
|
15
|
-
To
|
|
12
|
+
To view local Markdown files, use the
|
|
13
|
+
[MarkdownUp launcher](https://pypi.org/project/markdown-up/)
|
|
14
|
+
from a terminal prompt:
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
~~~
|
|
17
|
+
pip install markdown-up
|
|
18
|
+
markdown-up
|
|
19
|
+
~~~
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Host Markdown Web Pages
|
|
23
|
+
|
|
24
|
+
To host a Markdown resource, download the MarkdownUp application stub to the directory containing
|
|
25
|
+
your Markdown files:
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
~~~
|
|
28
|
+
curl -O https://craigahobbs.github.io/markdown-up/extra/index.html
|
|
29
|
+
~~~
|
|
30
|
+
|
|
31
|
+
To test your Markdown page, start a local static web server:
|
|
32
|
+
|
|
33
|
+
~~~
|
|
34
|
+
python3 -m http.server
|
|
35
|
+
~~~
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
By default, MarkdownUp fetches the "README.md" resource. To change the default resource, update the
|
|
38
|
+
application stub file, index.html. For example:
|
|
25
39
|
|
|
26
|
-
|
|
40
|
+
~~~
|
|
41
|
+
...
|
|
27
42
|
<script type="module">
|
|
28
43
|
import {MarkdownUp} from 'https://craigahobbs.github.io/markdown-up/lib/app.js';
|
|
29
44
|
const app = new MarkdownUp(window, {'url': 'other.md'});
|
|
30
45
|
app.run();
|
|
31
46
|
</script>
|
|
32
|
-
|
|
47
|
+
...
|
|
48
|
+
~~~
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
To view a different Markdown resource, set the application's
|
|
51
|
+
["url" hash parameter](https://craigahobbs.github.io/markdown-up/#cmd.help=1)
|
|
52
|
+
(i.e., "http://127.0.0.1:8000#url=other.md").
|
|
35
53
|
|
|
36
|
-
- **fontSize** - The default font size, in points
|
|
37
54
|
|
|
38
|
-
|
|
55
|
+
### MarkdownUp Application Options
|
|
39
56
|
|
|
40
|
-
|
|
57
|
+
The MarkdownUp application supports the following options:
|
|
41
58
|
|
|
42
|
-
- **
|
|
59
|
+
- **fontSize** - The default font size, in points
|
|
43
60
|
|
|
61
|
+
- **lineHeight** - The default line height, in em
|
|
62
|
+
|
|
63
|
+
- **markdownText** - The default Markdown text
|
|
44
64
|
|
|
45
|
-
|
|
65
|
+
- **menu** - If false, the application menu is hidden
|
|
46
66
|
|
|
47
|
-
|
|
48
|
-
[markdown-up command-line application](https://pypi.org/project/markdown-up/).
|
|
67
|
+
- **url** - The default Markdown resource URL
|
|
49
68
|
|
|
50
69
|
|
|
51
70
|
## Development
|
|
52
71
|
|
|
53
|
-
|
|
72
|
+
MarkdownUp is developed using [javascript-build](https://github.com/craigahobbs/javascript-build#readme)
|
|
54
73
|
and it was started using [javascript-template](https://github.com/craigahobbs/javascript-template#readme):
|
|
55
74
|
|
|
56
|
-
|
|
75
|
+
~~~
|
|
57
76
|
template-specialize javascript-template/template/ markdown-up/ -k package markdown-up -k name 'Craig A. Hobbs' -k email 'craigahobbs@gmail.com' -k github 'craigahobbs'
|
|
58
|
-
|
|
77
|
+
~~~
|