How to use the jsdoc/fs.writeFileSync function in jsdoc

To help you get started, we’ve selected a few jsdoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github accordproject / concerto / packages / composer-website / jsdoc-template / publish.js View on Github external
var outpath = path.join(outdir, filename),
    html = view.render('container.tmpl', docData);

  if (resolveLinks) {
    html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
  }

  if (searchEnabled) {
    searchableDocuments[filename] = {
      "id": filename,
      "title": title,
      "body": searchData(html)
    };
  }

  fs.writeFileSync(outpath, html, 'utf8');
}
github synacor / frameworkless / jsdoc-template / publish.js View on Github external
function generateTutorial(title, tutorial, filename) {
        var tutorialData = {
            title: title,
            header: tutorial.title,
            content: tutorial.parse(),
            children: tutorial.children
        };

        var tutorialPath = path.join(outdir, filename),
            html = view.render('tutorial.tmpl', tutorialData);

        // yes, you can use {@link} in tutorials too!
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>

        fs.writeFileSync(tutorialPath, html, 'utf8');
    }
github macacajs / macaca-wd / theme / publish.js View on Github external
resolveLinks = resolveLinks === false ? false : true;

  var docData = {
    type: type,
    title: title,
    docs: docs
  };

  var outpath = path.join(outdir, filename),
    html = view.render('container.tmpl', docData);

  if (resolveLinks) {
    html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
  }

  fs.writeFileSync(outpath, html, 'utf8');
}
github Vincit / objection.js / jsdocTemplate / publish.js View on Github external
resolveLinks = resolveLinks === false ? false : true;

	var docData = {
		title   : title,
		docs    : docs,
		docType : docType
	};

	var outpath = path.join( outdir, filename ),
		html = view.render( 'container.tmpl', docData );

	if ( resolveLinks ) {
		html = helper.resolveLinks( html ); // turn {@link foo} into <a href="foodoc.html">foo</a>
	}

	fs.writeFileSync( outpath, html, 'utf8' );
}
github jsdoc / jsdoc / templates / default / publish.js View on Github external
function generateTutorial(title, tutorial, filename) {
        var tutorialData = {
            title: title,
            header: tutorial.title,
            content: tutorial.parse(),
            children: tutorial.children
        };

        var tutorialPath = path.join(outdir, filename),
            html = view.render('tutorial.tmpl', tutorialData);

        // yes, you can use {@link} in tutorials too!
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>

        fs.writeFileSync(tutorialPath, html, 'utf8');
    }
github jsplumb / jsplumb / node_modules / jsdoc / templates / default / publish.js View on Github external
function generate(title, docs, filename, resolveLinks) {
    resolveLinks = resolveLinks === false ? false : true;

    var docData = {
        title: title,
        docs: docs
    };
    
    var outpath = path.join(outdir, filename),
        html = view.render('container.tmpl', docData);
    
    if (resolveLinks) {
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
    }
    
    fs.writeFileSync(outpath, html, 'utf8');
}
github BladeRunnerJS / brjs / brjs-sdk / build-resources / includes / sdk / jsdoc-toolkit-resources / jsdoc-toolkit / templates / default / publish.js View on Github external
function generateTutorial(title, tutorial, filename) {
        var tutorialData = {
            title: title,
            header: tutorial.title,
            content: tutorial.parse(),
            children: tutorial.children
        };

        var tutorialPath = path.join(outdir, filename),
            html = view.render('tutorial.tmpl', tutorialData);

        // yes, you can use {@link} in tutorials too!
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>

        fs.writeFileSync(tutorialPath, html, 'utf8');
    }
github IGNF / geoportal-access-lib / doc / jaguarjs-jsdoc / publish.js View on Github external
resolveLinks = resolveLinks === false ? false : true;

    var docData = {
        filename: filename,
        title: title,
        docs: docs
    };

    var outpath = path.join(outdir, filename),
        html = view.render('container.tmpl', docData);

    if (resolveLinks) {
        html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
    }

    fs.writeFileSync(outpath, html, 'utf8');
}
github pubfood / pubfood / jsdoc_template / publish.js View on Github external
var header = fs.readFileSync(__dirname + '/tmpl/header.tmpl', 'utf-8');
  var footer = fs.readFileSync(__dirname + '/tmpl/footer.tmpl', 'utf-8');

  var apiContentOnlyHtml = homeHtmlData.concat(
    classHtmlData,
    otherApiHtmlData
  ).join('\n');

  var singlePageApiHtml = [header].concat(
    '<div id="main">' + apiContentOnlyHtml + '</div>',
    '<nav>' + nav + '</nav>',
    footer
  ).join('\n');

  fs.writeFileSync(path.join(outdir, 'index.html'), singlePageApiHtml, 'utf8');
  fs.writeFileSync(path.join(outdir, 'api_content_only.html'), apiContentOnlyHtml, 'utf8');
  fs.writeFileSync(path.join(outdir, 'api_nav_only.html'), nav, 'utf8');
}