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.
- package/dist/docgen.js +4 -4
- package/dist/source/docgen.js +891 -0
- package/package.json +9 -2
- package/.gitattributes +0 -1
- package/.github/workflows/deploy-website.yml +0 -28
- package/.prettierignore +0 -4
- package/.prettierrc +0 -4
- package/docgen.js +0 -95
- package/index.html +0 -10
- package/source/__test__/test-run/contents.json +0 -12
- package/source/__test__/test-run/files/images/logo.png +0 -0
- package/source/__test__/test-run/overview.txt +0 -3
- package/source/__test__/test-run/parameters.json +0 -32
- package/source/__test__/test-run/release-notes.txt +0 -4
- package/source/docgen.js +0 -988
- package/source/example/contents.json +0 -12
- package/source/example/files/images/logo.png +0 -0
- package/source/example/index.txt +0 -4
- package/source/example/parameters.json +0 -37
- package/source/example/release-notes.txt +0 -1
- package/source/internal-readme.md +0 -4
- package/source/optional/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Math-Regular.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/source/optional/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/source/optional/katex/katex.min.css +0 -1
- package/source/optional/katex/katex.min.js +0 -6
- package/source/pdf-contents.xsl +0 -71
- package/source/pdf-stylesheet.css +0 -59
- package/source/release-checklist.txt +0 -27
- package/source/require/docgen.css +0 -138
- package/source/require/katexInjector.js +0 -18
- package/source/require/print.css +0 -26
- package/source/require/webknife/fonts/DroidSansMono.woff +0 -0
- package/source/require/webknife/fonts/OpenSans.woff +0 -0
- package/source/require/webknife/fonts/OpenSansBold.woff +0 -0
- package/source/require/webknife/fonts/OpenSansBoldItalic.woff +0 -0
- package/source/require/webknife/fonts/OpenSansItalic.woff +0 -0
- package/source/require/webknife/framework.icons.js +0 -82
- package/source/require/webknife/framework.min.css +0 -3
- package/source/require/webknife/framework.min.js +0 -14
- package/source/require/webknife/highlight.min.css +0 -1
- package/source/require/webknife/highlight.min.js +0 -6
- package/source/templates/main.html +0 -93
- package/source/templates/pdfCover.html +0 -128
- package/source/templates/pdfFooter.html +0 -59
- package/source/templates/pdfHeader.html +0 -21
- package/source/templates/redirect.html +0 -10
- package/source/templates/webCover.html +0 -73
- package/source/user-guide/advanced-content.txt +0 -171
- package/source/user-guide/commonmark.txt +0 -156
- package/source/user-guide/contents.json +0 -57
- package/source/user-guide/files/images/logo.png +0 -0
- package/source/user-guide/files/images/overview.png +0 -0
- package/source/user-guide/files/images/pdf.png +0 -0
- package/source/user-guide/files/images/svg/icon.svg +0 -845
- package/source/user-guide/files/images/svg/inkit-logo.svg +0 -9
- package/source/user-guide/files/images/svg/overview.svg +0 -1345
- package/source/user-guide/files/images/text.png +0 -0
- package/source/user-guide/files/images/web.png +0 -0
- package/source/user-guide/index.txt +0 -258
- package/source/user-guide/installation.txt +0 -49
- package/source/user-guide/parameters.json +0 -37
- package/source/user-guide/release-notes.txt +0 -70
- package/source/user-guide/running.txt +0 -47
- package/source/user-guide/troubleshooting.txt +0 -32
- package/source/user-guide/upgrading.txt +0 -25
- package/source/user-guide/version-control.txt +0 -13
- package/source/user-guide/writing-content.txt +0 -269
- package/tsconfig.json +0 -8
package/package.json
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docgen-tool",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "A tool for creating HTML and PDF documentation",
|
|
5
5
|
"main": "dist/docgen.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"docgen": "dist/docgen.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/*"
|
|
11
|
+
],
|
|
9
12
|
"scripts": {
|
|
13
|
+
"clean": "rimraf dist/",
|
|
14
|
+
"copy-files": "copyfiles -u 1 src/example/* dist/",
|
|
10
15
|
"dev": "ts-node docgen.js run",
|
|
11
|
-
"build": "tsc -p tsconfig.json",
|
|
16
|
+
"build": "yarn clean && tsc -p tsconfig.json && yarn copy-files",
|
|
12
17
|
"run:build": "dist/docgen.js",
|
|
13
18
|
"build:docs": "ts-node docgen.js run -i ./source/user-guide -o ./docs -p -m -n -d 40000",
|
|
14
19
|
"test": "npm run prettier:check",
|
|
@@ -42,9 +47,11 @@
|
|
|
42
47
|
},
|
|
43
48
|
"devDependencies": {
|
|
44
49
|
"@types/node": "^20.3.1",
|
|
50
|
+
"copyfiles": "^2.4.1",
|
|
45
51
|
"eslint": "^8.43.0",
|
|
46
52
|
"eslint-config-prettier": "^8.8.0",
|
|
47
53
|
"prettier": "^2.1.2",
|
|
54
|
+
"rimraf": "^5.0.1",
|
|
48
55
|
"ts-node": "^10.9.1",
|
|
49
56
|
"tslib": "^2.5.3",
|
|
50
57
|
"typescript": "^5.1.3"
|
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* text=auto eol=lf
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: Deploy Website
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: [ master ]
|
|
5
|
-
permissions:
|
|
6
|
-
contents: write
|
|
7
|
-
jobs:
|
|
8
|
-
build-and-deploy:
|
|
9
|
-
concurrency: ci-${{ github.ref }}
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout 🛎️
|
|
13
|
-
uses: actions/checkout@v3
|
|
14
|
-
|
|
15
|
-
- name: Install and Build 🔧
|
|
16
|
-
run: |
|
|
17
|
-
sudo apt-get install -y xfonts-base xfonts-75dpi
|
|
18
|
-
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
|
|
19
|
-
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
|
|
20
|
-
sudo apt-get -f install -y
|
|
21
|
-
wkhtmltopdf -V
|
|
22
|
-
yarn install --frozen-lockfile
|
|
23
|
-
yarn build:docs
|
|
24
|
-
|
|
25
|
-
- name: Deploy 🚀
|
|
26
|
-
uses: JamesIves/github-pages-deploy-action@v4
|
|
27
|
-
with:
|
|
28
|
-
folder: . # directory to deploy
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/docgen.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
let docgen = require('./source/docgen.js');
|
|
4
|
-
let program = require('commander');
|
|
5
|
-
|
|
6
|
-
let generator = new docgen(process);
|
|
7
|
-
|
|
8
|
-
const scaffold = (command) => {
|
|
9
|
-
generator.setOptions(command);
|
|
10
|
-
generator.scaffold();
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const run = (command) => {
|
|
14
|
-
generator.setOptions(command);
|
|
15
|
-
generator.run();
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/*
|
|
19
|
-
parse command-line arguments with node commander
|
|
20
|
-
commander help: http://slides.com/timsanteford/conquering-commander-js
|
|
21
|
-
command-line conventions: http://docopt.org
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
program.version(generator.getVersion()).usage('[command] [--option]');
|
|
25
|
-
|
|
26
|
-
program
|
|
27
|
-
.command('scaffold')
|
|
28
|
-
.usage('[--option]')
|
|
29
|
-
.description('create a template input directory')
|
|
30
|
-
.option(
|
|
31
|
-
'-o, --output [path]',
|
|
32
|
-
'path to the output directory (default: ./)',
|
|
33
|
-
'./',
|
|
34
|
-
)
|
|
35
|
-
.option('-v, --verbose', 'show verbose output including detailed errors')
|
|
36
|
-
.action((command) => {
|
|
37
|
-
scaffold(command);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
program
|
|
41
|
-
.command('run')
|
|
42
|
-
.usage('[--option]')
|
|
43
|
-
.description('create a static website from an input directory')
|
|
44
|
-
.option(
|
|
45
|
-
'-i, --input [path]',
|
|
46
|
-
'path to the input directory [default: ./]',
|
|
47
|
-
'./',
|
|
48
|
-
)
|
|
49
|
-
.option(
|
|
50
|
-
'-o, --output [path]',
|
|
51
|
-
'path to the output directory [default: ./output]',
|
|
52
|
-
'./output',
|
|
53
|
-
)
|
|
54
|
-
.option('-v, --verbose', 'show verbose output including detailed errors')
|
|
55
|
-
.option(
|
|
56
|
-
'-t, --page-toc',
|
|
57
|
-
'show a page table of contents at the top of each web page',
|
|
58
|
-
)
|
|
59
|
-
.option('-p, --pdf', 'create a PDF document')
|
|
60
|
-
.option(
|
|
61
|
-
'-d, --pdf-delay [milliseconds]',
|
|
62
|
-
'delay PDF printing to allow time for dynamic rendering [default: 2000]',
|
|
63
|
-
'2000',
|
|
64
|
-
)
|
|
65
|
-
.option('-m, --math-katex', 'enable KaTex mathematical expressions')
|
|
66
|
-
.option('-n, --math-mathjax', 'enable MathJax mathematical expressions')
|
|
67
|
-
.option(
|
|
68
|
-
'-r, --redirect',
|
|
69
|
-
'create an index.html in the parent directory that redirects to the homepage',
|
|
70
|
-
)
|
|
71
|
-
.option(
|
|
72
|
-
'-s, --set-version [version]',
|
|
73
|
-
'override parameters.version (useful for build tools) [default: false]',
|
|
74
|
-
false,
|
|
75
|
-
)
|
|
76
|
-
.option(
|
|
77
|
-
'-R, --set-release-date [date]',
|
|
78
|
-
'override parameters.date (useful for build tools) [default: false]',
|
|
79
|
-
false,
|
|
80
|
-
)
|
|
81
|
-
.option(
|
|
82
|
-
'-w, --wkhtmltopdf-path [path]',
|
|
83
|
-
'specify a custom path to wkhtmltopdf [default: wkhtmltopdf]',
|
|
84
|
-
'wkhtmltopdf',
|
|
85
|
-
)
|
|
86
|
-
.action((command) => {
|
|
87
|
-
run(command);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
program.parse(process.argv);
|
|
91
|
-
|
|
92
|
-
//if no arguments were provided, show help and then exit
|
|
93
|
-
if (!process.argv.slice(2).length) {
|
|
94
|
-
program.help();
|
|
95
|
-
}
|
package/index.html
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>DocGen - a documentation tool</title>
|
|
5
|
-
<meta http-equiv="REFRESH" content="0;url=docs/index.html">
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<a href="docs/index.html" style="color:#ccc;font-size:12px">Redirect to homepage</a>
|
|
9
|
-
</body>
|
|
10
|
-
</html>
|
|
Binary file
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "DocGen test case",
|
|
3
|
-
"name": "DocGen test case",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"date": "27/06/2023",
|
|
6
|
-
"organization": {
|
|
7
|
-
"name": "DocGen Test Case",
|
|
8
|
-
"url": "https://www.inkit.com"
|
|
9
|
-
},
|
|
10
|
-
"author": {
|
|
11
|
-
"name": "DocGen Test Case",
|
|
12
|
-
"url": "https://www.inkit.com"
|
|
13
|
-
},
|
|
14
|
-
"owner": {
|
|
15
|
-
"name": "DocGen Test Case",
|
|
16
|
-
"url": "https://www.inkit.com"
|
|
17
|
-
},
|
|
18
|
-
"contributors": [],
|
|
19
|
-
"website": {
|
|
20
|
-
"name": "Github",
|
|
21
|
-
"url": "https://github.com/mtmacdonald/docgen"
|
|
22
|
-
},
|
|
23
|
-
"backlink": {
|
|
24
|
-
"name": "",
|
|
25
|
-
"url": ""
|
|
26
|
-
},
|
|
27
|
-
"module": "",
|
|
28
|
-
"id": "",
|
|
29
|
-
"summary": "DocGen test case.",
|
|
30
|
-
"marking": "MIT License.",
|
|
31
|
-
"legalese": ""
|
|
32
|
-
}
|