docgen-tool 3.2.3 → 3.2.5
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}/docgen.js +19 -18
- package/dist/docgen.js +1 -1
- package/dist/include/optional/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/include/optional/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/include/optional/katex/katex.min.css +1105 -0
- package/dist/include/optional/katex/katex.min.js +12562 -0
- package/dist/{source → include}/require/styles/framework.css +131 -58
- package/dist/include/require/styles/framework.icons.js +143 -0
- package/dist/include/require/styles/framework.js +5420 -0
- package/dist/include/require/styles/highlight.min.css +153 -0
- package/dist/include/require/styles/highlight.min.js +1545 -0
- package/package.json +11 -12
- 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 +0 -1
- package/dist/source/optional/katex/katex.min.js +0 -6
- package/dist/source/require/styles/framework.icons.js +0 -79
- package/dist/source/require/styles/framework.js +0 -16
- package/dist/source/require/styles/highlight.min.css +0 -1
- package/dist/source/require/styles/highlight.min.js +0 -6
- /package/dist/{source → include}/example/contents.json +0 -0
- /package/dist/{source → include}/example/files/images/logo.png +0 -0
- /package/dist/{source → include}/example/index.txt +0 -0
- /package/dist/{source → include}/example/parameters.json +0 -0
- /package/dist/{source → include}/example/release-notes.txt +0 -0
- /package/dist/{source → include}/pdf-contents.xsl +0 -0
- /package/dist/{source → include}/pdf-stylesheet.css +0 -0
- /package/dist/{source → include}/require/docgen.css +0 -0
- /package/dist/{source → include}/require/katexInjector.js +0 -0
- /package/dist/{source → include}/require/print.css +0 -0
- /package/dist/{source → include}/require/styles/fonts/DroidSansMono.woff +0 -0
- /package/dist/{source → include}/require/styles/fonts/Montserrat-Italic.woff +0 -0
- /package/dist/{source → include}/require/styles/fonts/Montserrat-Regular.woff +0 -0
- /package/dist/{source → include}/require/styles/fonts/Montserrat-SemiBold.woff +0 -0
- /package/dist/{source → include}/require/styles/fonts/Montserrat-SemiBoldItalic.woff +0 -0
- /package/dist/{source → include}/templates/main.html +0 -0
- /package/dist/{source → include}/templates/pdfCover.html +0 -0
- /package/dist/{source → include}/templates/pdfFooter.html +0 -0
- /package/dist/{source → include}/templates/pdfHeader.html +0 -0
- /package/dist/{source → include}/templates/redirect.html +0 -0
- /package/dist/{source → include}/templates/webCover.html +0 -0
|
@@ -12,7 +12,7 @@ var chalk = require('chalk');
|
|
|
12
12
|
var spawnArgs = require('spawn-args');
|
|
13
13
|
var cliSpinner = require('cli-spinner').Spinner;
|
|
14
14
|
var imageSizeOf = require('image-size');
|
|
15
|
-
var package_json_1 = require("
|
|
15
|
+
var package_json_1 = require("../../package.json");
|
|
16
16
|
//Allow CommonMark links that use other protocols, such as file:///
|
|
17
17
|
//The markdown-it implementation is more restrictive than the CommonMark spec
|
|
18
18
|
//See https://github.com/markdown-it/markdown-it/issues/108
|
|
@@ -48,7 +48,7 @@ function DocGen(process) {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
/*
|
|
51
|
-
copy the example
|
|
51
|
+
copy the example src files (template) to any directory, when scaffold command is invoked
|
|
52
52
|
*/
|
|
53
53
|
this.scaffold = function () {
|
|
54
54
|
console.log(chalk.green('Creating scaffold template directory'));
|
|
@@ -63,11 +63,12 @@ function DocGen(process) {
|
|
|
63
63
|
/*
|
|
64
64
|
read any file (async)
|
|
65
65
|
*/
|
|
66
|
-
var readFile = function (
|
|
66
|
+
var readFile = function (filePath) {
|
|
67
|
+
var normalized = path.normalize(filePath);
|
|
67
68
|
return new rsvp.Promise(function (resolve, reject) {
|
|
68
|
-
fs.readFile(
|
|
69
|
+
fs.readFile(normalized, 'utf8', function (error, data) {
|
|
69
70
|
if (error) {
|
|
70
|
-
console.log(chalk.red('Error reading file: ' +
|
|
71
|
+
console.log(chalk.red('Error reading file: ' + normalized));
|
|
71
72
|
reject(error);
|
|
72
73
|
}
|
|
73
74
|
else {
|
|
@@ -145,12 +146,12 @@ function DocGen(process) {
|
|
|
145
146
|
var loadTemplates = function () {
|
|
146
147
|
console.log(chalk.green('Loading templates'));
|
|
147
148
|
var files = {
|
|
148
|
-
main: readFile(__dirname + '/templates/main.html'),
|
|
149
|
-
redirect: readFile(__dirname + '/templates/redirect.html'),
|
|
150
|
-
webCover: readFile(__dirname + '/templates/webCover.html'),
|
|
151
|
-
pdfCover: readFile(__dirname + '/templates/pdfCover.html'),
|
|
152
|
-
pdfHeader: readFile(__dirname + '/templates/pdfHeader.html'),
|
|
153
|
-
pdfFooter: readFile(__dirname + '/templates/pdfFooter.html'),
|
|
149
|
+
main: readFile(__dirname + '/../include/templates/main.html'),
|
|
150
|
+
redirect: readFile(__dirname + '/../include/templates/redirect.html'),
|
|
151
|
+
webCover: readFile(__dirname + '/../include/templates/webCover.html'),
|
|
152
|
+
pdfCover: readFile(__dirname + '/../include/templates/pdfCover.html'),
|
|
153
|
+
pdfHeader: readFile(__dirname + '/../include/templates/pdfHeader.html'),
|
|
154
|
+
pdfFooter: readFile(__dirname + '/../include/templates/pdfFooter.html'),
|
|
154
155
|
};
|
|
155
156
|
rsvp
|
|
156
157
|
.hash(files)
|
|
@@ -362,10 +363,10 @@ function DocGen(process) {
|
|
|
362
363
|
});
|
|
363
364
|
};
|
|
364
365
|
/*
|
|
365
|
-
load all markdown files (
|
|
366
|
+
load all markdown files (src)
|
|
366
367
|
*/
|
|
367
368
|
var loadMarkdown = function () {
|
|
368
|
-
console.log(chalk.green('Loading
|
|
369
|
+
console.log(chalk.green('Loading src files'));
|
|
369
370
|
var keys = [];
|
|
370
371
|
var files = [];
|
|
371
372
|
meta.contents.forEach(function (section) {
|
|
@@ -405,7 +406,7 @@ function DocGen(process) {
|
|
|
405
406
|
})
|
|
406
407
|
.catch(function (error) {
|
|
407
408
|
console.log(error);
|
|
408
|
-
console.log(chalk.red('Error loading
|
|
409
|
+
console.log(chalk.red('Error loading src files'));
|
|
409
410
|
if (options.verbose === true) {
|
|
410
411
|
console.log(chalk.red(error));
|
|
411
412
|
}
|
|
@@ -735,10 +736,10 @@ function DocGen(process) {
|
|
|
735
736
|
rsvp
|
|
736
737
|
.hash(promises)
|
|
737
738
|
.then(function () {
|
|
738
|
-
copyDirSync(__dirname + '/require', options.output + 'require'); //CSS, JavaScript
|
|
739
|
+
copyDirSync(__dirname + '/../include/require', options.output + 'require'); //CSS, JavaScript
|
|
739
740
|
copyDirSync(options.input + '/files', options.output + 'files'); //user-attached files and images
|
|
740
741
|
if (options.mathKatex === true) {
|
|
741
|
-
copyDirSync(__dirname + '/optional/katex', options.output + 'require/katex');
|
|
742
|
+
copyDirSync(__dirname + '/../include/optional/katex', options.output + 'require/katex');
|
|
742
743
|
}
|
|
743
744
|
checkPdfVersion();
|
|
744
745
|
})
|
|
@@ -771,11 +772,11 @@ function DocGen(process) {
|
|
|
771
772
|
var pdfName = meta.parameters.name.toLowerCase() + '.pdf';
|
|
772
773
|
pdfOptions.push(' --enable-local-file-access');
|
|
773
774
|
pdfOptions.push(' --javascript-delay ' + options.pdfDelay); //code syntax highlight in wkhtmltopdf 0.12.2.1 fails without a delay (but why doesn't --no-stop-slow-scripts work?)
|
|
774
|
-
pdfOptions.push(' --user-style-sheet ' + __dirname + '/pdf-stylesheet.css');
|
|
775
|
+
pdfOptions.push(' --user-style-sheet ' + __dirname + '/../include/pdf-stylesheet.css');
|
|
775
776
|
pdfOptions.push(' --header-html ' + options.output + 'temp/pdfHeader.html');
|
|
776
777
|
pdfOptions.push(' --footer-html ' + options.output + 'temp/pdfFooter.html');
|
|
777
778
|
pdfOptions.push(' cover ' + options.output + 'temp/pdfCover.html');
|
|
778
|
-
pdfOptions.push(' toc --xsl-style-sheet ' + __dirname + '/pdf-contents.xsl');
|
|
779
|
+
pdfOptions.push(' toc --xsl-style-sheet ' + __dirname + '/../include/pdf-contents.xsl');
|
|
779
780
|
var allPages = '';
|
|
780
781
|
for (var key in sortedPages) {
|
|
781
782
|
if (sortedPages.hasOwnProperty(key)) {
|
package/dist/docgen.js
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|