不要怂,就是干,撸起袖子干!

output.md.ejs 2.75 KB
<? docfiles.forEach(function(doc) { ?>
  <? doc.javadoc.forEach(function(comment) { ?>
    <? if (comment.name && comment.private !== true) { -?>
      <? if (!comment.ignore) { ?>
        <a name="<?= comment.name ?>" />
        <? if (comment.isConstructor) { ?>
            ### `new <?= comment.name ?><?= comment.paramStr ?>`
          <? } else if (comment.isMixin) { ?>
            ### Mixin <?= comment.name ?>
          <? } else if (comment.isClass) { ?>
            ### Class <?= comment.name ?>
          <? } else { ?>
            #### `<?= comment.name ?><?= comment.paramStr ?>` <? if (comment.returnTags.length > 0) { ?> -> `<?= comment.returnTags[0].joinedTypes ?>` <? } ?>
          <? } ?>
        <? } ?>

        <?= comment.description ?>

        <? if (comment.mixes.length) { ?>
          ### Mixes:
          <? comment.mixes.forEach(function (mix) { -?>
            * [<?=mix.text ?>](<?=mix.link ?>)
          <? }) ?>
        <? } ?>

        <? if (comment.isClass) { ?>
          ### Members:
          <? doc.members.forEach(function (member) { -?>
            * [<?= member.text ?>](<?= member.link ?>)
          <? }) -?>
        <? } ?>

        <? if (comment.deprecated) { ?>
          **Deprecated** <?- comment.deprecated ?>
        <? } ?>

        <? if (comment.version) { ?>
          Version: <?= comment.version ?>
        <? } ?>

        <? if (comment.see.length) { ?>See:<? } ?>
        <? comment.see.forEach(function (see) { -?>
          <? if (see.url !== false) { -?>
            * [<?= see.text ?>](<?= see.url ?>)
          <? } else { -?>
            * <?= see.text ?>
          <? } -?>
        <? }) -?>

      <? if (comment.paramTags.length > 0) { ?>
        ##### Params: 
        | Name | Type | Description |
        | ---- | ---- | ----------- |
        <? comment.paramTags.forEach(function(paramTag) { -?>
          | <?= paramTag.name ?> | <?= paramTag.joinedTypes ?> | <?= paramTag.description ?> |
        <? }) ?>
      <? } ?>

      <? if (comment.returnTags.length > 0 && comment.returnTags[0].description.length > 0) { ?>
        __Returns:__ <?= comment.returnTags[0].description ?>
      <? } ?>

      <? if (comment.aliases) { ?>
        __Aliases:__ *<?= comment.aliases ?>*
      <? } ?>
     ======
    <? } ?>
  <? }) ?>

  _This document is automatically generated based on source code comments. Please do not edit it directly, as your changes will be ignored. Please write on <a href="irc://irc.freenode.net/#sequelizejs">IRC</a>, open an issue or a create a pull request if you feel something can be improved. For help on how to write source code documentation see [JSDoc](http://usejsdoc.org) and [markdox](https://github.com/cbou/markdox)_

  _This documentation was automagically created on <?= new Date().toString() ?>_

<? }) ?>