MCPcopy Index your code
hub / github.com/jsdoc/jsdoc / generateTutorial

Function generateTutorial

templates/default/publish.js:667–681  ·  view source on GitHub ↗
(title, tutorial, filename)

Source from the content-addressed store, hash-verified

665
666 // TODO: move the tutorial functions to templateHelper.js
667 function generateTutorial(title, tutorial, filename) {
668 const tutorialData = {
669 title: title,
670 header: tutorial.title,
671 content: tutorial.parse(),
672 children: tutorial.children
673 };
674 const tutorialPath = path.join(outdir, filename);
675 let html = view.render('tutorial.tmpl', tutorialData);
676
677 // yes, you can use {@link} in tutorials too!
678 html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
679
680 fs.writeFileSync(tutorialPath, html, 'utf8');
681 }
682
683 // tutorials can have only one parent so there is no risk for loops
684 function saveChildren({children}) {

Callers 1

saveChildrenFunction · 0.85

Calls 2

renderMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…