docgen-tool 3.0.1 → 3.0.3
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/dist/source/docgen.js +1 -1
- package/package.json +7 -2
- package/dist/source/optional/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Math-Regular.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/source/optional/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/source/pdf-contents.xsl +0 -71
- package/dist/source/require/docgen.css +0 -138
- package/dist/source/require/katexInjector.js +0 -18
- package/dist/source/require/print.css +0 -26
- package/dist/source/require/webknife/fonts/DroidSansMono.woff +0 -0
- package/dist/source/require/webknife/fonts/OpenSans.woff +0 -0
- package/dist/source/require/webknife/fonts/OpenSansBold.woff +0 -0
- package/dist/source/require/webknife/fonts/OpenSansBoldItalic.woff +0 -0
- package/dist/source/require/webknife/fonts/OpenSansItalic.woff +0 -0
package/dist/source/docgen.js
CHANGED
|
@@ -23,7 +23,7 @@ markdown.validateLink = function () {
|
|
|
23
23
|
*/
|
|
24
24
|
function DocGen(process) {
|
|
25
25
|
var mainProcess = process;
|
|
26
|
-
var version = '3.0.
|
|
26
|
+
var version = '3.0.2';
|
|
27
27
|
var wkhtmltopdfVersion = 'wkhtmltopdf 0.12.6 (with patched qt)'; //output from wkhtmltopdf -V
|
|
28
28
|
var options;
|
|
29
29
|
var templates = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docgen-tool",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "A tool for creating HTML and PDF documentation",
|
|
5
5
|
"main": "dist/docgen.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,12 +10,15 @@
|
|
|
10
10
|
"dist/*"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
+
"clean": "rimraf dist/",
|
|
14
|
+
"copy-files": "copyfiles source/katexInjector.js source/example/**/* source/optional/**/* source/require/**/* source/templates/**/* dist/",
|
|
13
15
|
"dev": "ts-node docgen.js run",
|
|
14
|
-
"build": "tsc -p tsconfig.json",
|
|
16
|
+
"build": "yarn clean && tsc -p tsconfig.json && yarn copy-files",
|
|
15
17
|
"run:build": "dist/docgen.js",
|
|
16
18
|
"build:docs": "ts-node docgen.js run -i ./source/user-guide -o ./docs -p -m -n -d 40000",
|
|
17
19
|
"test": "npm run prettier:check",
|
|
18
20
|
"test:run": "ts-node docgen.js run -i ./source/__test__/test-run -o ./source/__test__/test-run-output",
|
|
21
|
+
"test:prod:run": "./dist/docgen.js run -i ./source/__test__/test-run -o -p -v -d 20000 ../source/__test__/test-run-output",
|
|
19
22
|
"prettier:check": "prettier --check 'docgen.js' '*.{js,json,css,less}'",
|
|
20
23
|
"prettier:fix": "prettier --write 'docgen.js' '*.{js,json,css,less}'"
|
|
21
24
|
},
|
|
@@ -45,9 +48,11 @@
|
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
50
|
"@types/node": "^20.3.1",
|
|
51
|
+
"copyfiles": "^2.4.1",
|
|
48
52
|
"eslint": "^8.43.0",
|
|
49
53
|
"eslint-config-prettier": "^8.8.0",
|
|
50
54
|
"prettier": "^2.1.2",
|
|
55
|
+
"rimraf": "^5.0.1",
|
|
51
56
|
"ts-node": "^10.9.1",
|
|
52
57
|
"tslib": "^2.5.3",
|
|
53
58
|
"typescript": "^5.1.3"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<xsl:stylesheet version="2.0"
|
|
3
|
-
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
4
|
-
xmlns:outline="http://wkhtmltopdf.org/outline"
|
|
5
|
-
xmlns="http://www.w3.org/1999/xhtml">
|
|
6
|
-
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
7
|
-
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
|
|
8
|
-
indent="yes" />
|
|
9
|
-
<xsl:template match="outline:outline">
|
|
10
|
-
<html>
|
|
11
|
-
<head>
|
|
12
|
-
<title>Table of Contents</title>
|
|
13
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
14
|
-
<style>
|
|
15
|
-
h1, ul, a {
|
|
16
|
-
font-family: 'open-sans', Arial, sans-serif;
|
|
17
|
-
color: #444;
|
|
18
|
-
}
|
|
19
|
-
h1 {
|
|
20
|
-
text-align: center;
|
|
21
|
-
font-size: 21px;
|
|
22
|
-
color: #385691;
|
|
23
|
-
}
|
|
24
|
-
div {
|
|
25
|
-
border-bottom: 1px dotted #ddd;
|
|
26
|
-
}
|
|
27
|
-
span {
|
|
28
|
-
float: right;
|
|
29
|
-
}
|
|
30
|
-
li {
|
|
31
|
-
list-style: none;
|
|
32
|
-
}
|
|
33
|
-
ul {
|
|
34
|
-
font-size: 14px;
|
|
35
|
-
line-height: 20px;
|
|
36
|
-
}
|
|
37
|
-
ul ul {font-size: 90%; }
|
|
38
|
-
ul {padding-left: 0em;}
|
|
39
|
-
ul ul {padding-left: 1em;}
|
|
40
|
-
a {text-decoration: none; }
|
|
41
|
-
</style>
|
|
42
|
-
</head>
|
|
43
|
-
<body>
|
|
44
|
-
<h1>Table of Contents</h1>
|
|
45
|
-
<ul><xsl:apply-templates select="outline:item/outline:item"/></ul>
|
|
46
|
-
</body>
|
|
47
|
-
</html>
|
|
48
|
-
</xsl:template>
|
|
49
|
-
<xsl:template match="outline:item">
|
|
50
|
-
<li>
|
|
51
|
-
<xsl:if test="@title!=''">
|
|
52
|
-
<div>
|
|
53
|
-
<a>
|
|
54
|
-
<xsl:if test="@link">
|
|
55
|
-
<xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
|
|
56
|
-
</xsl:if>
|
|
57
|
-
<xsl:if test="@backLink">
|
|
58
|
-
<xsl:attribute name="name"><xsl:value-of select="@backLink"/></xsl:attribute>
|
|
59
|
-
</xsl:if>
|
|
60
|
-
<xsl:value-of select="@title" />
|
|
61
|
-
</a>
|
|
62
|
-
<span> <xsl:value-of select="@page" /> </span>
|
|
63
|
-
</div>
|
|
64
|
-
</xsl:if>
|
|
65
|
-
<ul>
|
|
66
|
-
<xsl:comment>added to prevent self-closing tags in QtXmlPatterns</xsl:comment>
|
|
67
|
-
<xsl:apply-templates select="outline:item"/>
|
|
68
|
-
</ul>
|
|
69
|
-
</li>
|
|
70
|
-
</xsl:template>
|
|
71
|
-
</xsl:stylesheet>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
pre {
|
|
2
|
-
font-size: 12px; /*todo - move to webknife*/
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
section blockquote p,
|
|
6
|
-
section li p {
|
|
7
|
-
margin: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.w-table {
|
|
11
|
-
width: 100%;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/******************************** TABLE OF CONTENTS ****************************/
|
|
15
|
-
|
|
16
|
-
/*Table of contents button to initiate show/hide*/
|
|
17
|
-
#dg-navigator {
|
|
18
|
-
float: right;
|
|
19
|
-
background-color: #4d4d4d;
|
|
20
|
-
color: white;
|
|
21
|
-
text-align: right;
|
|
22
|
-
padding: 10px 20px 10px 20px;
|
|
23
|
-
margin-right: 200px;
|
|
24
|
-
border-radius: 0 0 10px 10px;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
font-weight: bold;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/*Table of contents container*/
|
|
30
|
-
#dg-toc {
|
|
31
|
-
color: white;
|
|
32
|
-
background-color: #4d4d4d;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
#dg-toc table {
|
|
36
|
-
table-layout: auto;
|
|
37
|
-
width: 100%;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
#dg-toc div {
|
|
41
|
-
padding: 15px 0 15px 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/*Columns in table of contents*/
|
|
45
|
-
|
|
46
|
-
#dg-toc td {
|
|
47
|
-
border-right: 1px solid #666;
|
|
48
|
-
vertical-align: top;
|
|
49
|
-
text-align: left;
|
|
50
|
-
padding: 0 20px 0 20px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
#dg-toc ul {
|
|
54
|
-
padding: 0;
|
|
55
|
-
list-style-type: none;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
#dg-toc li {
|
|
59
|
-
font-weight: bold;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
#dg-toc table td a {
|
|
63
|
-
color: white;
|
|
64
|
-
font-weight: normal;
|
|
65
|
-
text-decoration: none;
|
|
66
|
-
margin-left: 10px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
#dg-toc table td a:hover {
|
|
70
|
-
text-decoration: underline;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
#dg-tocFixedColumn {
|
|
74
|
-
border-right: none;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#dg-toc table #dg-tocFixedColumn a {
|
|
78
|
-
vertical-align: middle;
|
|
79
|
-
margin-left: 4px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.dg-tocGroup {
|
|
83
|
-
width: 22%;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.dg-tocHeading {
|
|
87
|
-
font-size: 16px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.dg-tocIcon {
|
|
91
|
-
width: 18px;
|
|
92
|
-
height: 18px;
|
|
93
|
-
float: left;
|
|
94
|
-
}
|
|
95
|
-
.dg-tocIcon svg {
|
|
96
|
-
fill: white;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/*
|
|
100
|
-
Page table of contents
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
.dg-pageToc {
|
|
104
|
-
list-style: none;
|
|
105
|
-
padding: 10px;
|
|
106
|
-
border: 1px solid #999;
|
|
107
|
-
background-color: #eee;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/*
|
|
111
|
-
Class to make a heading look invisible in web page, but still appear in the PDF table of contents
|
|
112
|
-
- display:none, visibily: hidden, zero dimensions, and offscreen positioning don't work
|
|
113
|
-
- so instead take it out of the flow and make it small and translucent
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
.dg-hiddenTitle {
|
|
117
|
-
display: block;
|
|
118
|
-
border: none;
|
|
119
|
-
margin: 0;
|
|
120
|
-
padding: 0;
|
|
121
|
-
width: 1px;
|
|
122
|
-
height: 1px;
|
|
123
|
-
overflow: hidden;
|
|
124
|
-
position: absolute;
|
|
125
|
-
background-color: transparent;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.dg-fakeHeading {
|
|
129
|
-
/*todo - move to webknife*/
|
|
130
|
-
text-decoration: none;
|
|
131
|
-
font-weight: bold;
|
|
132
|
-
color: #385691;
|
|
133
|
-
padding-bottom: 5px;
|
|
134
|
-
border-bottom: 1px solid #999;
|
|
135
|
-
margin: 20px 0 20px 0;
|
|
136
|
-
font-size: 16px;
|
|
137
|
-
padding-bottom: 4px;
|
|
138
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
$(document).ready(function () {
|
|
2
|
-
//mathematical expressions using katex, if enabled
|
|
3
|
-
$('.dg-katexMath').each(function () {
|
|
4
|
-
var texTxt = $(this).text();
|
|
5
|
-
|
|
6
|
-
el = $(this).get(0);
|
|
7
|
-
if (el.tagName == 'DIV') {
|
|
8
|
-
addDisp = '\\displaystyle';
|
|
9
|
-
} else {
|
|
10
|
-
addDisp = '';
|
|
11
|
-
}
|
|
12
|
-
try {
|
|
13
|
-
katex.render(addDisp + texTxt, el);
|
|
14
|
-
} catch (err) {
|
|
15
|
-
$(this).html("<span class='err'>" + err);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
html {
|
|
2
|
-
background-color: white; /*otherwise background artefacts appear as a feint outline in PDF*/
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.dg-pageToc {
|
|
6
|
-
display: none;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
#dg-toc,
|
|
10
|
-
#dg-navigator,
|
|
11
|
-
header,
|
|
12
|
-
footer {
|
|
13
|
-
display: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.dg-avoidBreak,
|
|
17
|
-
#dg-content th,
|
|
18
|
-
#dg-content tr,
|
|
19
|
-
#dg-content blockquote,
|
|
20
|
-
#dg-content pre {
|
|
21
|
-
page-break-inside: avoid;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.dg-forceBreak {
|
|
25
|
-
page-break-after: always;
|
|
26
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|