docgen-tool 3.0.0 → 3.0.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.
Files changed (77) hide show
  1. package/dist/docgen.js +4 -4
  2. package/dist/source/docgen.js +891 -0
  3. package/package.json +9 -2
  4. package/.gitattributes +0 -1
  5. package/.github/workflows/deploy-website.yml +0 -28
  6. package/.prettierignore +0 -4
  7. package/.prettierrc +0 -4
  8. package/docgen.js +0 -95
  9. package/index.html +0 -10
  10. package/source/__test__/test-run/contents.json +0 -12
  11. package/source/__test__/test-run/files/images/logo.png +0 -0
  12. package/source/__test__/test-run/overview.txt +0 -3
  13. package/source/__test__/test-run/parameters.json +0 -32
  14. package/source/__test__/test-run/release-notes.txt +0 -4
  15. package/source/docgen.js +0 -988
  16. package/source/example/contents.json +0 -12
  17. package/source/example/files/images/logo.png +0 -0
  18. package/source/example/index.txt +0 -4
  19. package/source/example/parameters.json +0 -37
  20. package/source/example/release-notes.txt +0 -1
  21. package/source/internal-readme.md +0 -4
  22. package/source/optional/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  23. package/source/optional/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  24. package/source/optional/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  25. package/source/optional/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  26. package/source/optional/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  27. package/source/optional/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  28. package/source/optional/katex/fonts/KaTeX_Math-Regular.woff +0 -0
  29. package/source/optional/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  30. package/source/optional/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  31. package/source/optional/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  32. package/source/optional/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  33. package/source/optional/katex/katex.min.css +0 -1
  34. package/source/optional/katex/katex.min.js +0 -6
  35. package/source/pdf-contents.xsl +0 -71
  36. package/source/pdf-stylesheet.css +0 -59
  37. package/source/release-checklist.txt +0 -27
  38. package/source/require/docgen.css +0 -138
  39. package/source/require/katexInjector.js +0 -18
  40. package/source/require/print.css +0 -26
  41. package/source/require/webknife/fonts/DroidSansMono.woff +0 -0
  42. package/source/require/webknife/fonts/OpenSans.woff +0 -0
  43. package/source/require/webknife/fonts/OpenSansBold.woff +0 -0
  44. package/source/require/webknife/fonts/OpenSansBoldItalic.woff +0 -0
  45. package/source/require/webknife/fonts/OpenSansItalic.woff +0 -0
  46. package/source/require/webknife/framework.icons.js +0 -82
  47. package/source/require/webknife/framework.min.css +0 -3
  48. package/source/require/webknife/framework.min.js +0 -14
  49. package/source/require/webknife/highlight.min.css +0 -1
  50. package/source/require/webknife/highlight.min.js +0 -6
  51. package/source/templates/main.html +0 -93
  52. package/source/templates/pdfCover.html +0 -128
  53. package/source/templates/pdfFooter.html +0 -59
  54. package/source/templates/pdfHeader.html +0 -21
  55. package/source/templates/redirect.html +0 -10
  56. package/source/templates/webCover.html +0 -73
  57. package/source/user-guide/advanced-content.txt +0 -171
  58. package/source/user-guide/commonmark.txt +0 -156
  59. package/source/user-guide/contents.json +0 -57
  60. package/source/user-guide/files/images/logo.png +0 -0
  61. package/source/user-guide/files/images/overview.png +0 -0
  62. package/source/user-guide/files/images/pdf.png +0 -0
  63. package/source/user-guide/files/images/svg/icon.svg +0 -845
  64. package/source/user-guide/files/images/svg/inkit-logo.svg +0 -9
  65. package/source/user-guide/files/images/svg/overview.svg +0 -1345
  66. package/source/user-guide/files/images/text.png +0 -0
  67. package/source/user-guide/files/images/web.png +0 -0
  68. package/source/user-guide/index.txt +0 -258
  69. package/source/user-guide/installation.txt +0 -49
  70. package/source/user-guide/parameters.json +0 -37
  71. package/source/user-guide/release-notes.txt +0 -70
  72. package/source/user-guide/running.txt +0 -47
  73. package/source/user-guide/troubleshooting.txt +0 -32
  74. package/source/user-guide/upgrading.txt +0 -25
  75. package/source/user-guide/version-control.txt +0 -13
  76. package/source/user-guide/writing-content.txt +0 -269
  77. package/tsconfig.json +0 -8
@@ -1,269 +0,0 @@
1
- <style>
2
- .container {
3
- box-sizing: border-box;
4
- float:left;
5
- width: 480px;
6
- }
7
- .codeContainer {
8
- margin: 0 20px 0 0;
9
- }
10
- .codeContainer pre {
11
- margin: 0;
12
- }
13
- .codeContainer code {
14
- }
15
- .codeContainer p {
16
- margin: 0;
17
- padding: 0;
18
- }
19
- .exampleContainer {
20
- margin: 0;
21
- border: 1px solid #666;
22
- border-radius: 6px;
23
- padding: 0 18px 0 18px;
24
- }
25
- .exampleContainer img {
26
- margin-top: 5px;
27
- }
28
- #content table {
29
- width: 400px!important;
30
- }
31
- .hljs-change {
32
- background-color: transparent!important;
33
- }
34
- </style>
35
-
36
- Content for a DocGen website is authored in plain text, using any text editor. Image files can be embedded, and
37
- other types of files can be attached as links. Additionally, website metadata is configured
38
- via [JSON](http://json.org) files.
39
-
40
- Overview
41
- --------
42
-
43
- DocGen transforms source files from an input directory into output files in an output directory.
44
-
45
- It takes every source file (plain text) specified in **contents.json** and converts it. Each source file becomes a
46
- separate page in the website and a separate chapter in the PDF.
47
-
48
- DocGen adds metadata that is specified in **parameters.json**, and copies the images and files in the **files**
49
- directory to the output.
50
-
51
- > Always save input files with **UTF-8** encoding. This makes non-standard characters (ø © é etc) work.
52
-
53
- Metadata
54
- --------
55
-
56
- **parameters.json**
57
-
58
- The parameters file is used to specify metadata describing the product.
59
-
60
- - **title** - the product title
61
- - **name** - the product name (also used to name the PDF)
62
- - **version** - the release version
63
- - **date** - the release date
64
- - **organization** - the company or organization
65
- - **author** - the lead author of the document
66
- - **owner** - the owner of the product
67
- - **contributors** - list of contributors
68
- - **website** - a link to the product website
69
- - **backlink** - a link back to product user interface (useful for integrated documentation)
70
- - **module** - module name (useful for larger products with submodules)
71
- - **id** - reference number (e.g. product id in a change management tool)
72
- - **summary** - a descriptive summary of the product
73
- - **marking** - license or other protective markings
74
- - **legalese** - document markings (confidentiality, disclaimers, smallprint etc)
75
-
76
- Values can be empty strings, but the elements are required in the JSON file.
77
-
78
- Parameters with URLs can be either website URLs, or email addresses (specify *'mailto:name@address.com'*).
79
-
80
- **contents.json**
81
-
82
- The contents file specifies the names, locations, order, and hierarchy of the source files. It is used to generate both
83
- the web and PDF table of contents.
84
-
85
- **release-notes.txt**
86
-
87
- The release notes source file is a mandatory source file (that does not need to be listed in contents.json). Use it to
88
- summarize the change history for each version of the product.
89
-
90
- Plain text
91
- ----------
92
-
93
- The simplest input format is just to write in plain text. Here is an example of the source and output:
94
-
95
- <div class="container codeContainer">
96
-
97
- Example paragraph.
98
-
99
- </div>
100
- <div class="container exampleContainer">
101
-
102
- Example paragraph.
103
-
104
- </div><br class="w-clear"/>
105
-
106
- <p class="dg-forceBreak"></p>
107
-
108
- CommonMark (Markdown)
109
- ---------------------
110
-
111
- [CommonMark](http://commonmark.org/) (also known as [MarkDown](http://daringfireball.net/projects/markdown/)) is a
112
- human-friendly plain text markup format. The source format is easy to read and write, and the CommonMark parser
113
- translates it into HTML. DocGen uses the <a href="https://markdown-it.github.io">markdown-it</a> implementation
114
- of CommonMark. Here is an example of the source and output:
115
-
116
- <div class="container codeContainer">
117
-
118
- CommonMark Example
119
- ------------------
120
-
121
- Paragraphs are text blocks separated by new lines.
122
-
123
- Text can be styled: *emphasised* and **strong**.
124
-
125
- Here is an [example link](http://www.google.com).
126
-
127
- # To make a code block, just indent with a tab
128
- # "Hello World" in Ruby:
129
- 5.times { puts "Hello!" }
130
- </div>
131
- <div class="container exampleContainer">
132
-
133
- <p class="dg-fakeHeading" style="font-size: 18px; padding-bottom: 4px;">CommonMark Example</p>
134
-
135
- Paragraphs are text blocks separated by new lines.
136
-
137
- Text can be styled: *emphasised* and **strong**.
138
-
139
- Here is an [example link](http://www.google.com).
140
-
141
- # To make a code block, just indent with a tab
142
- # "Hello World" in Ruby:
143
- 5.times { puts "Hello!" }
144
- </div><br class="w-clear"/>
145
-
146
- For more examples, see the [CommonMark reference](commonmark.html).
147
-
148
- HTML
149
- ----
150
-
151
- For more complex pages not covered by CommonMark's syntax, simply use inline HTML:
152
-
153
- <div class="container codeContainer">
154
- <pre><code>&lt;table&gt;
155
- &lt;tr&gt;
156
- &lt;td&gt;Foo&lt;/td&gt;
157
- &lt;td&gt;Bar&lt;/td&gt;
158
- &lt;td&gt;Baz&lt;/td&gt;
159
- &lt;/tr&gt;
160
- &lt;/table&gt;</code></pre>
161
- </div>
162
- <div class="container exampleContainer">
163
- <table>
164
- <tr>
165
- <td>Foo</td>
166
- <td>Bar</td>
167
- <td>Baz</td>
168
- </tr>
169
- </table>
170
- </div><br class="w-clear"/>
171
-
172
- For more examples, see [writing advanced content](advanced-content.html).
173
-
174
- > Inline HTML is still parsed by the CommonMark parser (HTML is allowed in CommonMark documents). In DocGen, it is also
175
- possible to bypass the CommonMark parser altogether and specify a pure HTML input page, by setting
176
- <code class="w-inline-code">"html": true</code> in a page object in *contents.json*.
177
-
178
- Embedding images
179
- ----------------
180
-
181
- Diagrams (in image form, e.g. JPEG, PNG, GIF etc) should be put the *files/images* directory, and embedded as images.
182
-
183
- <div class="container codeContainer">
184
- <pre><code>![](files/images/logo.png)</code></pre>
185
- </div>
186
- <div class="container exampleContainer">
187
- <img src="files/images/logo.png" />
188
- </div><br class="w-clear"/>
189
-
190
- Attaching files
191
- ---------------
192
-
193
- Other files you want to attach should go into *files* directory.
194
-
195
- <div class="container codeContainer">
196
- <pre><code>[attachment](user_guide.pdf)</code></pre>
197
- </div>
198
- <div class="container exampleContainer">
199
- <a href="user_guide.pdf">attachment</a>
200
- </div><br class="w-clear"/>
201
-
202
- Mathematical Expressions
203
- ------------------------
204
-
205
- [LaTeX](http://en.wikipedia.org/wiki/LaTeX) is the most common markup format for mathematical expressions.
206
-
207
- Modern web browsers do not yet consistently support a common standard for authoring mathematical expressions. For this
208
- reason, extra libraries are needed. DocGen supports two widely-used web mathematics libraries out-the-box:
209
-
210
- - **[KaTeX](http://khan.github.io/KaTeX/)** is fast, lightweight, and [supports fewer features](http://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX)
211
- - **[MathJax](https://www.mathjax.org/)** is slower, larger, and [supports more features](http://docs.mathjax.org/en/latest/tex.html#supported-latex-commands)
212
-
213
- The document author decides which one (or both) to use.
214
-
215
- <p class="dg-forceBreak"></p>
216
-
217
- ### Mathematics using KaTeX
218
-
219
- KaTeX is the recommended choice. It is bundled with DocGen but must be enabled by passing the
220
- **-m** option.
221
-
222
- <div class="container codeContainer">
223
- <pre><code>&lt;div class=&quot;dg-katexMath&quot;&gt;
224
- f(x) = \int_{-\infty}^\infty
225
- \hat f(\xi)\,e^{2 \pi i \xi x}
226
- \,d\xi
227
- &lt;/div&gt;</code></pre>
228
- </div>
229
- <div class="container exampleContainer">
230
- <div class="dg-katexMath">
231
- f(x) = \int_{-\infty}^\infty
232
- \hat f(\xi)\,e^{2 \pi i \xi x}
233
- \,d\xi
234
- </div>
235
- </div><br class="w-clear"/>
236
-
237
- ### Mathematics using MathJax
238
-
239
- MathJax is the fallback choice for expressions not yet supported by KaTex. When required, MathJax can be enabled by
240
- passing the **-n** option.
241
-
242
- > DocGen uses the same MathJax configuration as the popular [Stack Exchange](http://math.stackexchange.com) websites.
243
-
244
- <p class="w-error">
245
- Because MathJax is a large library, it is not bundled with DocGen, but is served from a third-party CDN
246
- (content delivery network). This means users need an active Internet connection for the MathJax feature to work.
247
- </p>
248
-
249
- <p class="w-error">
250
- MathJax can be slow to render. When used with the PDF feature, it may be necessary to allow more rendering time by
251
- passing the <br/><strong>-d [milliseconds]</strong> option.
252
- </p>
253
-
254
- <div class="container codeContainer">
255
- <pre><code>$$
256
- f(n) = \begin{cases}
257
- n/2, & \text{if $n$ is even} \\
258
- 3n+1, & \text{if $n$ is odd}
259
- \end{cases}
260
- $$</code></pre>
261
- </div>
262
- <div class="container exampleContainer">
263
- $$
264
- f(n) = \begin{cases}
265
- n/2, & \text{if $n$ is even} \\
266
- 3n+1, & \text{if $n$ is odd}
267
- \end{cases}
268
- $$
269
- </div><br class="w-clear"/>
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "./dist",
4
- "allowJs": true,
5
- "target": "es5"
6
- },
7
- "files": ["./docgen.js"]
8
- }