docgen-tool 3.2.1 → 3.2.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/docgen.js +51 -0
- package/dist/source/docgen.js +905 -0
- package/dist/source/example/contents.json +12 -0
- package/dist/source/example/files/images/logo.png +0 -0
- package/dist/source/example/index.txt +4 -0
- package/dist/source/example/parameters.json +37 -0
- package/dist/source/example/release-notes.txt +1 -0
- 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/optional/katex/katex.min.css +1 -0
- package/dist/source/optional/katex/katex.min.js +6 -0
- package/dist/source/pdf-contents.xsl +71 -0
- package/dist/source/pdf-stylesheet.css +59 -0
- package/dist/source/require/docgen.css +136 -0
- package/dist/source/require/katexInjector.js +18 -0
- package/dist/source/require/print.css +26 -0
- package/dist/source/require/styles/fonts/DroidSansMono.woff +0 -0
- package/dist/source/require/styles/fonts/Montserrat-Italic.woff +0 -0
- package/dist/source/require/styles/fonts/Montserrat-Regular.woff +0 -0
- package/dist/source/require/styles/fonts/Montserrat-SemiBold.woff +0 -0
- package/dist/source/require/styles/fonts/Montserrat-SemiBoldItalic.woff +0 -0
- package/dist/source/require/styles/framework.css +949 -0
- package/dist/source/require/styles/framework.icons.js +79 -0
- package/dist/source/require/styles/framework.js +16 -0
- package/dist/source/require/styles/highlight.min.css +1 -0
- package/dist/source/require/styles/highlight.min.js +6 -0
- package/dist/source/templates/main.html +95 -0
- package/dist/source/templates/pdfCover.html +128 -0
- package/dist/source/templates/pdfFooter.html +59 -0
- package/dist/source/templates/pdfHeader.html +21 -0
- package/dist/source/templates/redirect.html +10 -0
- package/dist/source/templates/webCover.html +73 -0
- package/package.json +1 -1
package/dist/docgen.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var docgen = require('./source/docgen.js');
|
|
3
|
+
var program = require('commander');
|
|
4
|
+
var generator = new docgen(process);
|
|
5
|
+
var scaffold = function (command) {
|
|
6
|
+
generator.setOptions(command);
|
|
7
|
+
generator.scaffold();
|
|
8
|
+
};
|
|
9
|
+
var run = function (command) {
|
|
10
|
+
generator.setOptions(command);
|
|
11
|
+
generator.run();
|
|
12
|
+
};
|
|
13
|
+
/*
|
|
14
|
+
parse command-line arguments with node commander
|
|
15
|
+
commander help: http://slides.com/timsanteford/conquering-commander-js
|
|
16
|
+
command-line conventions: http://docopt.org
|
|
17
|
+
*/
|
|
18
|
+
program.version(generator.getVersion()).usage('[command] [--option]');
|
|
19
|
+
program
|
|
20
|
+
.command('scaffold')
|
|
21
|
+
.usage('[--option]')
|
|
22
|
+
.description('create a template input directory')
|
|
23
|
+
.option('-o, --output [path]', 'path to the output directory (default: ./)', './')
|
|
24
|
+
.option('-v, --verbose', 'show verbose output including detailed errors')
|
|
25
|
+
.action(function (command) {
|
|
26
|
+
scaffold(command);
|
|
27
|
+
});
|
|
28
|
+
program
|
|
29
|
+
.command('run')
|
|
30
|
+
.usage('[--option]')
|
|
31
|
+
.description('create a static website from an input directory')
|
|
32
|
+
.option('-i, --input [path]', 'path to the input directory [default: ./]', './')
|
|
33
|
+
.option('-o, --output [path]', 'path to the output directory [default: ./output]', './output')
|
|
34
|
+
.option('-v, --verbose', 'show verbose output including detailed errors')
|
|
35
|
+
.option('-t, --page-toc', 'show a page table of contents at the top of each web page')
|
|
36
|
+
.option('-p, --pdf', 'create a PDF document')
|
|
37
|
+
.option('-d, --pdf-delay [milliseconds]', 'delay PDF printing to allow time for dynamic rendering [default: 2000]', '2000')
|
|
38
|
+
.option('-m, --math-katex', 'enable KaTex mathematical expressions')
|
|
39
|
+
.option('-n, --math-mathjax', 'enable MathJax mathematical expressions')
|
|
40
|
+
.option('-r, --redirect', 'create an index.html in the parent directory that redirects to the homepage')
|
|
41
|
+
.option('-s, --set-version [version]', 'override parameters.version (useful for build tools) [default: false]', false)
|
|
42
|
+
.option('-R, --set-release-date [date]', 'override parameters.date (useful for build tools) [default: false]', false)
|
|
43
|
+
.option('-w, --wkhtmltopdf-path [path]', 'specify a custom path to wkhtmltopdf [default: wkhtmltopdf]', 'wkhtmltopdf')
|
|
44
|
+
.action(function (command) {
|
|
45
|
+
run(command);
|
|
46
|
+
});
|
|
47
|
+
program.parse(process.argv);
|
|
48
|
+
//if no arguments were provided, show help and then exit
|
|
49
|
+
if (!process.argv.slice(2).length) {
|
|
50
|
+
program.help();
|
|
51
|
+
}
|