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
package/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "docgen-tool",
3
- "version": "3.0.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
@@ -1,4 +0,0 @@
1
- docs/
2
- dist/
3
- source/require/webknife
4
- source/optional/katex
package/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "all"
4
- }
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>
@@ -1,12 +0,0 @@
1
- [
2
- {
3
- "heading": "Test Run",
4
- "column": 1,
5
- "pages": [
6
- {
7
- "title": "Overview",
8
- "source": "overview.txt"
9
- }
10
- ]
11
- }
12
- ]
@@ -1,3 +0,0 @@
1
- # DocGen Test Case
2
-
3
- An example documentation site for testing.
@@ -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
- }
@@ -1,4 +0,0 @@
1
- DocGen Test Case 1.0.0 released 27/06/2023
2
- ------------------------------------------
3
-
4
- - Initial version of test case