Skip to content

Commit 956da48

Browse files
Add support for an option to avoid generating html and pdf
1 parent 38f59da commit 956da48

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

tasks/doc-md.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ module.exports = function(grunt) {
277277
guide.text = properties['name'];
278278
guide.directory = directory;
279279
guide.overrideGuideFile = properties['overrideGuideFile'];
280+
guide.makeDocument = properties['makeDocument'];
280281

281282
guides.push(guide);
282283
});
@@ -295,20 +296,22 @@ module.exports = function(grunt) {
295296
}
296297

297298
guides.forEach(function(guide, index) {
298-
processMarkdown({
299-
webDir: options.webDir,
300-
properties: guide.propertiesFile,
301-
guideFile: guide.link,
302-
guideLinks: guideLinksHtml,
303-
overrideGuideFile: guide.overrideGuideFile,
304-
output: options.output,
305-
pdfOutput: options.pdfOutput,
306-
pdfPandocTemplate: options.pdfPandocTemplate,
307-
keepMarkdown: options.keepMarkdown,
308-
markPdfFinished: function() {markPdfFinished(index);},
309-
docDir: path.join(options.docs, guide.directory),
310-
versionNumber: options.versionNumber
311-
});
299+
if (guide.makeDocument !== false) {
300+
processMarkdown({
301+
webDir: options.webDir,
302+
properties: guide.propertiesFile,
303+
guideFile: guide.link,
304+
guideLinks: guideLinksHtml,
305+
overrideGuideFile: guide.overrideGuideFile,
306+
output: options.output,
307+
pdfOutput: options.pdfOutput,
308+
pdfPandocTemplate: options.pdfPandocTemplate,
309+
keepMarkdown: options.keepMarkdown,
310+
markPdfFinished: function() {markPdfFinished(index);},
311+
docDir: path.join(options.docs, guide.directory),
312+
versionNumber: options.versionNumber
313+
});
314+
}
312315
});
313316
});
314317
grunt.task.run('docmd_markdown');

0 commit comments

Comments
 (0)