From 50f1d7830f5ad3874629272d26d8e2d0c72554d8 Mon Sep 17 00:00:00 2001 From: Lloyd Brookes Date: Thu, 29 Aug 2024 19:23:50 +0100 Subject: [PATCH] update generate-partial-cache script --- bin/generate-partial-cache.js | 3 +- package.json | 3 +- partials/partial-cache.js | 504 ++++++++++++++++++++++++++++++---- 3 files changed, 456 insertions(+), 54 deletions(-) diff --git a/bin/generate-partial-cache.js b/bin/generate-partial-cache.js index 952169c..93ba293 100644 --- a/bin/generate-partial-cache.js +++ b/bin/generate-partial-cache.js @@ -1,6 +1,7 @@ const FileSet = require('file-set') const fs = require('fs') const path = require('path') +const util = require('util') const fileSet = new FileSet() @@ -13,7 +14,7 @@ async function start () { fs.readFileSync(file, 'utf8') || '' ) } - console.log('module.exports = ' + JSON.stringify(Array.from(map), null, ' ')) + console.log('module.exports = ' + util.inspect(Array.from(map), { compact: false, maxStringLength: Infinity, maxArrayLength: Infinity })) } start() diff --git a/package.json b/package.json index 8d7db5a..392aec6 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "partials" ], "scripts": { - "test": "75lb-nature test-runner test/api.js test/grouping.js test/parseType.js test/plugin.js test/ddata/children.js test/ddata/globals.js test/ddata/linkTo.js test/ddata/list.js test/ddata/orphans.js test/ddata/parseLink.js test/ddata/return-sig.js test/ddata/type-link.js" + "test": "75lb-nature test-runner test/api.js test/grouping.js test/parseType.js test/plugin.js test/ddata/children.js test/ddata/globals.js test/ddata/linkTo.js test/ddata/list.js test/ddata/orphans.js test/ddata/parseLink.js test/ddata/return-sig.js test/ddata/type-link.js", + "partials": "node bin/generate-partial-cache.js > partials/partial-cache.js" }, "dependencies": { "array-back": "^6.2.2", diff --git a/partials/partial-cache.js b/partials/partial-cache.js index fcfe835..5a80711 100644 --- a/partials/partial-cache.js +++ b/partials/partial-cache.js @@ -17,7 +17,12 @@ module.exports = [ ], [ 'main-index', - '{{! a main index is only shown if at least 2 global or modules exist ~}}\n\n{{#if (showMainIndex)~}}\n{{>module-index~}}\n{{>global-index~}}\n{{/if~}}\n' + '{{! a main index is only shown if at least 2 global or modules exist ~}}\n' + + '\n' + + '{{#if (showMainIndex)~}}\n' + + '{{>module-index~}}\n' + + '{{>global-index~}}\n' + + '{{/if~}}\n' ], [ 'all-docs', @@ -25,11 +30,38 @@ module.exports = [ ], [ 'linked-type-list', - '{{#each types~}}\n{{>link to=this html=../html ~}}\n{{#unless @last}}{{{../delimiter}}}{{/unless~}}\n{{/each}}' + '{{#each types~}}\n' + + '{{>link to=this html=../html ~}}\n' + + '{{#unless @last}}{{{../delimiter}}}{{/unless~}}\n' + + '{{/each}}' ], [ 'link', - '{{! usage: link to="namepath" html=true/false caption="optional caption"~}}\n\n{{~#if html~}}\n\n\n{{~#link to~}}\n{{#if url~}}\n{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if}}\n{{~else~}}\n{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if~}}\n{{/if~}}\n{{/link~}}\n\n\n{{~else~}}\n\n{{#link to~}}\n{{#if url~}}\n[{{#if ../../caption}}{{escape ../../../caption}}{{else}}{{escape name}}{{/if}}]({{{url}}})\n{{~else~}}\n{{#if ../../caption}}{{escape ../../../caption}}{{else}}{{escape name}}{{/if~}}\n{{~/if~}}\n{{/link~}}\n\n{{/if~}}\n' + '{{! usage: link to="namepath" html=true/false caption="optional caption"~}}\n' + + '\n' + + '{{~#if html~}}\n' + + '\n' + + '\n' + + '{{~#link to~}}\n' + + '{{#if url~}}\n' + + '{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if}}\n' + + '{{~else~}}\n' + + '{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if~}}\n' + + '{{/if~}}\n' + + '{{/link~}}\n' + + '\n' + + '\n' + + '{{~else~}}\n' + + '\n' + + '{{#link to~}}\n' + + '{{#if url~}}\n' + + '[{{#if ../../caption}}{{escape ../../../caption}}{{else}}{{escape name}}{{/if}}]({{{url}}})\n' + + '{{~else~}}\n' + + '{{#if ../../caption}}{{escape ../../../caption}}{{else}}{{escape name}}{{/if~}}\n' + + '{{~/if~}}\n' + + '{{/link~}}\n' + + '\n' + + '{{/if~}}\n' ], [ 'defaultvalue', @@ -37,55 +69,206 @@ module.exports = [ ], [ 'sig-name', - '{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n{{#if name}}{{#sig~}}\n{{{@depOpen}~}}\n{{{@codeOpen}~}}\n{{#if @prefix}}{{@prefix}} {{/if~}}\n{{@parent~}}\n{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{escape name}}}{{/if~}}\n{{#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n{{{@codeClose}~}}\n{{#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \\| " }}{{/if~}}\n{{#if @suffix}} {{@suffix}}{{/if~}}\n{{{@depClose}~}}\n{{~/sig}}{{/if~}}\n{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n' + '{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n' + + '{{#if name}}{{#sig~}}\n' + + '{{{@depOpen}~}}\n' + + '{{{@codeOpen}~}}\n' + + '{{#if @prefix}}{{@prefix}} {{/if~}}\n' + + '{{@parent~}}\n' + + '{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{escape name}}}{{/if~}}\n' + + '{{#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n' + + '{{{@codeClose}~}}\n' + + '{{#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n' + + '{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \\| " }}{{/if~}}\n' + + '{{#if @suffix}} {{@suffix}}{{/if~}}\n' + + '{{{@depClose}~}}\n' + + '{{~/sig}}{{/if~}}\n' + + '{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n' ], [ 'sig-link', - '{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n{{#if name}}{{#sig~}}\n{{{@depOpen}~}}\n[{{{@codeOpen}~}}\n{{#if @prefix}}{{@prefix}} {{/if~}}\n{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}}\n{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n{{{@codeClose}}}](#{{{anchorName}}})\n{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \\| " }}{{/if~}}\n{{#if @suffix}} {{@suffix}}{{/if~}}\n{{{@depClose}~}}\n{{~/sig}}{{/if~}}\n{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n' + '{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n' + + '{{#if name}}{{#sig~}}\n' + + '{{{@depOpen}~}}\n' + + '[{{{@codeOpen}~}}\n' + + '{{#if @prefix}}{{@prefix}} {{/if~}}\n' + + '{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}}\n' + + '{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n' + + '{{{@codeClose}}}](#{{{anchorName}}})\n' + + '{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n' + + '{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \\| " }}{{/if~}}\n' + + '{{#if @suffix}} {{@suffix}}{{/if~}}\n' + + '{{{@depClose}~}}\n' + + '{{~/sig}}{{/if~}}\n' + + '{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}\n' ], [ 'sig-link-parent', - '{{#if name}}{{#sig~}}\n{{{@depOpen}~}}\n[{{{@codeOpen}~}}\n{{#if @prefix}}{{@prefix}} {{/if~}}\n{{#if (isClassMember)}}{{@parent~}}{{/if~}}\n{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}}\n{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n{{{@codeClose}}}](#{{{anchorName}}})\n{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \\| " }}{{/if~}}\n{{#if @suffix}} {{@suffix}}{{/if~}}\n{{{@depClose}~}}\n{{~/sig}}{{/if~}}\n' + '{{#if name}}{{#sig~}}\n' + + '{{{@depOpen}~}}\n' + + '[{{{@codeOpen}~}}\n' + + '{{#if @prefix}}{{@prefix}} {{/if~}}\n' + + '{{#if (isClassMember)}}{{@parent~}}{{/if~}}\n' + + '{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}}\n' + + '{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n' + + '{{{@codeClose}}}](#{{{anchorName}}})\n' + + '{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n' + + '{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \\| " }}{{/if~}}\n' + + '{{#if @suffix}} {{@suffix}}{{/if~}}\n' + + '{{{@depClose}~}}\n' + + '{{~/sig}}{{/if~}}\n' ], [ 'sig-link-html', - '{{#if name}}{{#sig no-gfm=true ~}}\n{{{@depOpen}~}}\n\n{{~{@codeOpen}~}}\n{{#if @prefix}}{{@prefix}} {{/if~}}\n{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}}\n{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n{{{@codeClose}~}}\n\n{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n{{#if @returnTypes}} {{>linked-type-list types=@returnTypes html=true delimiter=" | " }}{{/if~}}\n{{#if @suffix}} {{@suffix}}{{/if~}}\n{{{@depClose}~}}\n{{~/sig}}{{/if~}}\n' + '{{#if name}}{{#sig no-gfm=true ~}}\n' + + '{{{@depOpen}~}}\n' + + '\n' + + '{{~{@codeOpen}~}}\n' + + '{{#if @prefix}}{{@prefix}} {{/if~}}\n' + + '{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{name}}}{{/if~}}\n' + + '{{~#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}\n' + + '{{{@codeClose}~}}\n' + + '\n' + + '{{~#if @returnSymbol}} {{@returnSymbol}}{{/if~}}\n' + + '{{#if @returnTypes}} {{>linked-type-list types=@returnTypes html=true delimiter=" | " }}{{/if~}}\n' + + '{{#if @suffix}} {{@suffix}}{{/if~}}\n' + + '{{{@depClose}~}}\n' + + '{{~/sig}}{{/if~}}\n' ], [ 'module-index', - '{{#unless (optionEquals "module-index-format" "none")~}}\n{{#if (optionEquals "module-index-format" "dl")}}{{>module-index-dl ~}}{{/if~}}\n{{#if (optionEquals "module-index-format" "grouped")}}{{>module-index-grouped ~}}{{/if~}}\n{{#if (optionEquals "module-index-format" "table")}}{{>module-index-table ~}}{{/if~}}\n{{/unless~}}\n' + '{{#unless (optionEquals "module-index-format" "none")~}}\n' + + '{{#if (optionEquals "module-index-format" "dl")}}{{>module-index-dl ~}}{{/if~}}\n' + + '{{#if (optionEquals "module-index-format" "grouped")}}{{>module-index-grouped ~}}{{/if~}}\n' + + '{{#if (optionEquals "module-index-format" "table")}}{{>module-index-table ~}}{{/if~}}\n' + + '{{/unless~}}\n' ], [ 'module-index-table', - '{{#modules~}}\n{{#if @first~}}\n{{>heading-indent}}Modules\n\n\n \n \n \n \n \n \n{{/if~}}\n \n \n \n \n{{#if @last~}}\n \n
ModuleDescription
{{>sig-link-html}}{{{md (inlineLinks description)}}}
\n\n{{/if~}}\n{{/modules}}\n' + '{{#modules~}}\n' + + '{{#if @first~}}\n' + + '{{>heading-indent}}Modules\n' + + '\n' + + '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '{{/if~}}\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '{{#if @last~}}\n' + + ' \n' + + '
ModuleDescription
{{>sig-link-html}}{{{md (inlineLinks description)}}}
\n' + + '\n' + + '{{/if~}}\n' + + '{{/modules}}\n' ], [ 'module-index-grouped', - '{{#modules~}}\n{{#if @first~}}{{>heading-indent}}Modules\n\n{{/if~}}\n{{>member-index-grouped~}}\n{{/modules}}\n\n' + '{{#modules~}}\n' + + '{{#if @first~}}{{>heading-indent}}Modules\n' + + '\n' + + '{{/if~}}\n' + + '{{>member-index-grouped~}}\n' + + '{{/modules}}\n' + + '\n' ], [ 'module-index-dl', - '{{#modules~}}\n{{#if @first~}}{{>heading-indent}}Modules\n\n
\n{{/if~}}\n
{{>sig-link-html}}
\n
{{{md (inlineLinks description)}}}
\n{{#if @last~}}
\n\n{{/if~}}\n{{/modules~}}\n' + '{{#modules~}}\n' + + '{{#if @first~}}{{>heading-indent}}Modules\n' + + '\n' + + '
\n' + + '{{/if~}}\n' + + '
{{>sig-link-html}}
\n' + + '
{{{md (inlineLinks description)}}}
\n' + + '{{#if @last~}}
\n' + + '\n' + + '{{/if~}}\n' + + '{{/modules~}}\n' ], [ 'global-index', - '{{>global-index-kinds kind="class" title="Classes" ~}}\n{{>global-index-kinds kind="mixin" title="Mixins" ~}}\n{{>global-index-kinds kind="member" title="Members" ~}}\n{{>global-index-kinds kind="namespace" title="Objects" ~}}\n{{>global-index-kinds kind="constant" title="Constants" ~}}\n{{>global-index-kinds kind="function" title="Functions" ~}}\n{{>global-index-kinds kind="event" title="Events" ~}}\n{{>global-index-kinds kind="typedef" title="Typedefs" ~}}\n{{>global-index-kinds kind="external" title="External" ~}}\n{{>global-index-kinds kind="interface" title="Interfaces" ~}}\n' + '{{>global-index-kinds kind="class" title="Classes" ~}}\n' + + '{{>global-index-kinds kind="mixin" title="Mixins" ~}}\n' + + '{{>global-index-kinds kind="member" title="Members" ~}}\n' + + '{{>global-index-kinds kind="namespace" title="Objects" ~}}\n' + + '{{>global-index-kinds kind="constant" title="Constants" ~}}\n' + + '{{>global-index-kinds kind="function" title="Functions" ~}}\n' + + '{{>global-index-kinds kind="event" title="Events" ~}}\n' + + '{{>global-index-kinds kind="typedef" title="Typedefs" ~}}\n' + + '{{>global-index-kinds kind="external" title="External" ~}}\n' + + '{{>global-index-kinds kind="interface" title="Interfaces" ~}}\n' ], [ 'global-index-table', - '{{#globals kind=kind~}}\n{{#if @first~}}\n{{>heading-indent}}{{../title}}\n\n\n \n \n \n \n \n \n{{/if~}}\n \n \n \n \n{{#if @last~}}\n \n
GlobalDescription
{{>sig-link-html}}{{{md (inlineLinks description)}}}
\n\n{{/if~}}\n{{/globals}}\n' + '{{#globals kind=kind~}}\n' + + '{{#if @first~}}\n' + + '{{>heading-indent}}{{../title}}\n' + + '\n' + + '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '{{/if~}}\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '{{#if @last~}}\n' + + ' \n' + + '
GlobalDescription
{{>sig-link-html}}{{{md (inlineLinks description)}}}
\n' + + '\n' + + '{{/if~}}\n' + + '{{/globals}}\n' ], [ 'global-index-kinds', - '{{#unless (optionEquals "global-index-format" "none")~}}\n{{#if (optionEquals "global-index-format" "dl")}}\n{{>global-index-dl kind=kind title=title ~}}\n{{/if~}}\n{{#if (optionEquals "global-index-format" "grouped")}}\n{{>global-index-grouped kind=kind title=title }}\n{{/if~}}\n{{#if (optionEquals "global-index-format" "table")}}\n{{>global-index-table kind=kind title=title ~}}\n{{/if~}}\n{{/unless~}}\n' + '{{#unless (optionEquals "global-index-format" "none")~}}\n' + + '{{#if (optionEquals "global-index-format" "dl")}}\n' + + '{{>global-index-dl kind=kind title=title ~}}\n' + + '{{/if~}}\n' + + '{{#if (optionEquals "global-index-format" "grouped")}}\n' + + '{{>global-index-grouped kind=kind title=title }}\n' + + '{{/if~}}\n' + + '{{#if (optionEquals "global-index-format" "table")}}\n' + + '{{>global-index-table kind=kind title=title ~}}\n' + + '{{/if~}}\n' + + '{{/unless~}}\n' ], [ 'global-index-grouped', - '{{#globals kind=kind~}}\n{{#if @first~}}{{>heading-indent}}{{../title}}\n\n{{/if~}}\n{{>member-index-grouped~}}\n{{#if @last}}\n\n{{/if~}}\n{{/globals}}\n' + '{{#globals kind=kind~}}\n' + + '{{#if @first~}}{{>heading-indent}}{{../title}}\n' + + '\n' + + '{{/if~}}\n' + + '{{>member-index-grouped~}}\n' + + '{{#if @last}}\n' + + '\n' + + '{{/if~}}\n' + + '{{/globals}}\n' ], [ 'global-index-dl', - '{{#globals kind=kind ~}}\n{{#if @first~}}{{>heading-indent}}{{../title}}\n\n
\n{{/if~}}\n
{{>sig-link-html}}
\n
{{{md (inlineLinks description)}}}
\n{{#if @last~}}
\n\n{{/if~}}\n{{/globals~}}\n' + '{{#globals kind=kind ~}}\n' + + '{{#if @first~}}{{>heading-indent}}{{../title}}\n' + + '\n' + + '
\n' + + '{{/if~}}\n' + + '
{{>sig-link-html}}
\n' + + '
{{{md (inlineLinks description)}}}
\n' + + '{{#if @last~}}
\n' + + '\n' + + '{{/if~}}\n' + + '{{/globals~}}\n' ], [ 'members', @@ -101,15 +284,46 @@ module.exports = [ ], [ 'member-index', - "{{setLevel this 0~}}\n{{#if (descendants min=(option 'memberIndex.minDescendants'))~}}\n{{#if isExported~}}\n{{#if (equal (depth) 0)}}\n{{#if (optionEquals \"member-index-format\" \"list\")}}\n\n{{>member-index-list}}\n\n{{else~}}\n\n{{>member-index-grouped}}\n\n{{/if~}}\n{{/if~}}\n{{else~}}\n{{#if (optionEquals \"member-index-format\" \"list\")}}\n\n{{>member-index-list}}\n\n{{else}}\n\n{{>member-index-grouped}}\n\n{{/if~}}\n{{/if~}}\n{{/if}}\n" + '{{setLevel this 0~}}\n' + + "{{#if (descendants min=(option 'memberIndex.minDescendants'))~}}\n" + + '{{#if isExported~}}\n' + + '{{#if (equal (depth) 0)}}\n' + + '{{#if (optionEquals "member-index-format" "list")}}\n' + + '\n' + + '{{>member-index-list}}\n' + + '\n' + + '{{else~}}\n' + + '\n' + + '{{>member-index-grouped}}\n' + + '\n' + + '{{/if~}}\n' + + '{{/if~}}\n' + + '{{else~}}\n' + + '{{#if (optionEquals "member-index-format" "list")}}\n' + + '\n' + + '{{>member-index-list}}\n' + + '\n' + + '{{else}}\n' + + '\n' + + '{{>member-index-grouped}}\n' + + '\n' + + '{{/if~}}\n' + + '{{/if~}}\n' + + '{{/if}}\n' ], [ 'member-index-list', - '{{>index-indent}}* {{>sig-link-parent}}\n{{#indexChildren ~}}\n{{>member-index-list~}}\n{{/indexChildren}}' + '{{>index-indent}}* {{>sig-link-parent}}\n' + + '{{#indexChildren ~}}\n' + + '{{>member-index-list~}}\n' + + '{{/indexChildren}}' ], [ 'member-index-grouped', - '{{string-repeat " " (add level baseLevel)}}* {{#unless (equal _title undefined)}}_{{_title}}_{{else}}{{>sig-link}}{{/unless}}\n{{#groupBy (option "group-by")~}}\n{{>member-index-grouped baseLevel=(add ../level ../baseLevel 1)~}}\n{{/groupBy~}}\n' + '{{string-repeat " " (add level baseLevel)}}* {{#unless (equal _title undefined)}}_{{_title}}_{{else}}{{>sig-link}}{{/unless}}\n' + + '{{#groupBy (option "group-by")~}}\n' + + '{{>member-index-grouped baseLevel=(add ../level ../baseLevel 1)~}}\n' + + '{{/groupBy~}}\n' ], [ 'version', @@ -117,11 +331,39 @@ module.exports = [ ], [ 'todo', - '{{#if todoList~}}\n**Todo**\n\n{{#if (option "no-gfm")~}}\n\n{{#each todoList~}}\n{{#if done}}- {{{inlineLinks task}}} ✓\n{{else}}- {{{inlineLinks task}}}\n{{/if~}}\n{{/each~}}\n\n{{else~}}\n\n{{#each todoList~}}\n{{#if done}}- [x] {{{inlineLinks task}}}\n{{else}}- [ ] {{{inlineLinks task}}}\n{{/if~}}\n{{/each~}}\n\n{{/if}}\n\n{{/if~}}\n' + '{{#if todoList~}}\n' + + '**Todo**\n' + + '\n' + + '{{#if (option "no-gfm")~}}\n' + + '\n' + + '{{#each todoList~}}\n' + + '{{#if done}}- {{{inlineLinks task}}} ✓\n' + + '{{else}}- {{{inlineLinks task}}}\n' + + '{{/if~}}\n' + + '{{/each~}}\n' + + '\n' + + '{{else~}}\n' + + '\n' + + '{{#each todoList~}}\n' + + '{{#if done}}- [x] {{{inlineLinks task}}}\n' + + '{{else}}- [ ] {{{inlineLinks task}}}\n' + + '{{/if~}}\n' + + '{{/each~}}\n' + + '\n' + + '{{/if}}\n' + + '\n' + + '{{/if~}}\n' ], [ 'throws', - '{{#if exceptions~}}\n**Throws**:\n\n{{#each exceptions~}}\n- {{#if type.names}}{{>linked-type-list types=type.names}} {{/if}}{{{inlineLinks description}}}\n{{/each}}\n\n{{/if}}' + '{{#if exceptions~}}\n' + + '**Throws**:\n' + + '\n' + + '{{#each exceptions~}}\n' + + '- {{#if type.names}}{{>linked-type-list types=type.names}} {{/if}}{{{inlineLinks description}}}\n' + + '{{/each}}\n' + + '\n' + + '{{/if}}' ], [ 'this', @@ -137,19 +379,52 @@ module.exports = [ ], [ 'see', - '{{#if see~}}\n\n{{#if (equal see.length 1)~}}\n**See**: {{{inlineLinks see.[0]}}} \n{{else~}}\n**See**\n\n{{#each see}}- {{{inlineLinks this}}}\n{{/each}}\n\n{{/if~}}\n{{/if~}}' + '{{#if see~}}\n' + + '\n' + + '{{#if (equal see.length 1)~}}\n' + + '**See**: {{{inlineLinks see.[0]}}} \n' + + '{{else~}}\n' + + '**See**\n' + + '\n' + + '{{#each see}}- {{{inlineLinks this}}}\n' + + '{{/each}}\n' + + '\n' + + '{{/if~}}\n' + + '{{/if~}}' ], [ 'scope', - '{{#if scope}}\n**Kind**: {{#if (equal kind "event") ~}}\nevent emitted{{#if memberof}} by {{>link to=memberof}}{{/if}} \n{{else~}}\n{{scope}} {{#if virtual}}abstract {{/if}}{{kindInThisContext}}{{#if memberof}} of {{>link to=memberof}}{{/if}} \n{{/if~}}\n{{else~}}\n{{#if isExported}}**Kind**: Exported {{kind}} \n{{/if~}}\n{{/if~}}' + '{{#if scope}}\n' + + '**Kind**: {{#if (equal kind "event") ~}}\n' + + 'event emitted{{#if memberof}} by {{>link to=memberof}}{{/if}} \n' + + '{{else~}}\n' + + '{{scope}} {{#if virtual}}abstract {{/if}}{{kindInThisContext}}{{#if memberof}} of {{>link to=memberof}}{{/if}} \n' + + '{{/if~}}\n' + + '{{else~}}\n' + + '{{#if isExported}}**Kind**: Exported {{kind}} \n' + + '{{/if~}}\n' + + '{{/if~}}' ], [ 'returns', - '{{#if returns}}\n{{#if returns.[0].description~}}\n**Returns**: {{#each returns~}}\n {{#if type~}}\n {{#if type.names}}{{>linked-type-list types=type.names delimiter=" \\| " ~}}{{/if}}\n {{~#if description}} - {{{inlineLinks description}}}{{/if~}}\n {{else~}}\n {{{inlineLinks description}~}}\n {{/if~}}\n{{~/each}}\n \n{{/if}}{{/if}}' + '{{#if returns}}\n' + + '{{#if returns.[0].description~}}\n' + + '**Returns**: {{#each returns~}}\n' + + ' {{#if type~}}\n' + + ' {{#if type.names}}{{>linked-type-list types=type.names delimiter=" \\| " ~}}{{/if}}\n' + + ' {{~#if description}} - {{{inlineLinks description}}}{{/if~}}\n' + + ' {{else~}}\n' + + ' {{{inlineLinks description}~}}\n' + + ' {{/if~}}\n' + + '{{~/each}}\n' + + ' \n' + + '{{/if}}{{/if}}' ], [ 'requires', - '{{#if requires~}}\n**Requires**: {{>linked-type-list types=requires delimiter=", " }} \n{{/if}}' + '{{#if requires~}}\n' + + '**Requires**: {{>linked-type-list types=requires delimiter=", " }} \n' + + '{{/if}}' ], [ 'readOnly', @@ -161,7 +436,9 @@ module.exports = [ ], [ 'mixes', - '{{#if mixes~}}\n**Mixes**: {{>linked-type-list types=mixes delimiter=", " }} \n{{/if}}' + '{{#if mixes~}}\n' + + '**Mixes**: {{>linked-type-list types=mixes delimiter=", " }} \n' + + '{{/if}}' ], [ 'license', @@ -169,15 +446,21 @@ module.exports = [ ], [ 'implements', - '{{#if implements}}**Implements**: {{>linked-type-list types=implements delimiter=", " }} \n{{/if}}\n' + '{{#if implements}}**Implements**: {{>linked-type-list types=implements delimiter=", " }} \n' + + '{{/if}}\n' ], [ 'fires', - '{{#if fires~}}\n**Emits**: {{>linked-type-list types=fires delimiter=", " }} \n{{/if}}' + '{{#if fires~}}\n' + + '**Emits**: {{>linked-type-list types=fires delimiter=", " }} \n' + + '{{/if}}' ], [ 'examples', - '{{#examples}}\n**Example**{{#if caption}} *({{caption}})* {{else}} {{/if}}\n{{{inlineLinks example}}}\n{{/examples}}\n' + '{{#examples}}\n' + + '**Example**{{#if caption}} *({{caption}})* {{else}} {{/if}}\n' + + '{{{inlineLinks example}}}\n' + + '{{/examples}}\n' ], [ 'description', @@ -189,11 +472,14 @@ module.exports = [ ], [ 'default', - '{{#unless (equal defaultvalue undefined)}}**Default**: {{>defaultvalue}} \n{{/unless}}' + '{{#unless (equal defaultvalue undefined)}}**Default**: {{>defaultvalue}} \n' + + '{{/unless}}' ], [ 'customTags', - '{{#if customTags}}{{#each customTags}}**{{titleCase tag}}**: {{#with (parseType value)~}}\n{{#if type}}{{>link to=type}}{{/if}}{{#if description}}{{{inlineLinks description}}}{{/if}}{{/with}} \n{{/each}}{{/if~}}\n' + '{{#if customTags}}{{#each customTags}}**{{titleCase tag}}**: {{#with (parseType value)~}}\n' + + '{{#if type}}{{>link to=type}}{{/if}}{{#if description}}{{{inlineLinks description}}}{{/if}}{{/with}} \n' + + '{{/each}}{{/if~}}\n' ], [ 'copyright', @@ -209,54 +495,168 @@ module.exports = [ ], [ 'body', - '{{>deprecated~}}\n{{>description~}}\n{{>scope~}}\n{{>summary~}}\n{{>augments~}}\n{{>implements~}}\n{{>mixes~}}\n{{>default~}}\n{{>chainable~}}\n{{>overrides~}}\n{{>returns~}}\n{{>category~}}\n{{>throws~}}\n{{>fires~}}\n{{>this~}}\n{{>access~}}\n{{>readOnly~}}\n{{>requires~}}\n{{>customTags~}}\n{{>see~}}\n{{>since~}}\n{{>version~}}\n{{>authors~}}\n{{>license~}}\n{{>copyright~}}\n{{>todo~}}\n{{>params~}}\n{{>properties~}}\n{{>examples~}}\n' + '{{>deprecated~}}\n' + + '{{>description~}}\n' + + '{{>scope~}}\n' + + '{{>summary~}}\n' + + '{{>augments~}}\n' + + '{{>implements~}}\n' + + '{{>mixes~}}\n' + + '{{>default~}}\n' + + '{{>chainable~}}\n' + + '{{>overrides~}}\n' + + '{{>returns~}}\n' + + '{{>category~}}\n' + + '{{>throws~}}\n' + + '{{>fires~}}\n' + + '{{>this~}}\n' + + '{{>access~}}\n' + + '{{>readOnly~}}\n' + + '{{>requires~}}\n' + + '{{>customTags~}}\n' + + '{{>see~}}\n' + + '{{>since~}}\n' + + '{{>version~}}\n' + + '{{>authors~}}\n' + + '{{>license~}}\n' + + '{{>copyright~}}\n' + + '{{>todo~}}\n' + + '{{>params~}}\n' + + '{{>properties~}}\n' + + '{{>examples~}}\n' ], [ 'authors', - '{{#if author}}{{#each author}}**Author**: {{{inlineLinks this}}} \n{{/each}}{{/if~}}\n' + '{{#if author}}{{#each author}}**Author**: {{{inlineLinks this}}} \n' + + '{{/each}}{{/if~}}\n' ], [ 'augments', - '{{#if augments}}**Extends**: {{>linked-type-list types=augments delimiter=", " }} \n{{/if}}\n' + '{{#if augments}}**Extends**: {{>linked-type-list types=augments delimiter=", " }} \n' + + '{{/if}}\n' ], [ 'access', '{{#if access}}**Access**: {{{access}}} \n{{/if~}}\n' ], [ - 'properties', - '{{#if (optionEquals "property-list-format" "list")}}{{>properties-list~}}{{/if~}}\n{{#if (optionEquals "property-list-format" "table")~}}\n {{#if (optionEquals "no-gfm" true)}}{{>properties-table-html}}{{else}}{{>properties-table}}{{/if~}}\n{{/if~}}\n' + 'params', + '{{#if (optionEquals "param-list-format" "list")}}{{>params-list~}}{{/if~}}\n' + + '{{#if (optionEquals "param-list-format" "table")~}}\n' + + '{{#if (optionEquals "no-gfm" true)}}{{>params-table-html~}}{{else}}{{>params-table~}}{{/if~}}\n' + + '{{/if~}}\n' ], [ - 'properties-table', - '{{#if properties}}**Properties**\n\n{{tableHead properties "name|Name" "type|Type" "defaultvalue|Default" "description|Description" ~}}\n\n{{#tableRow properties "name" "type" "defaultvalue" "description" ~}}\n| {{#if @col1}}{{>param-table-name}} | {{/if~}}\n{{#if @col2}}{{>linked-type-list types=type.names delimiter=" \\| " }} | {{/if~}}\n{{#if @col3}}{{>defaultvalue}} | {{/if~}}\n{{#if @col4}}{{{stripNewlines (inlineLinks description)}}} |{{/if}}\n{{/tableRow}}\n\n{{/if}}' + 'params-table', + '{{#if params}}\n' + + '\n' + + '{{tableHead params "name|Param" "type|Type" "defaultvalue|Default" "description|Description" ~}}\n' + + '\n' + + '{{#tableRow params "name" "type" "defaultvalue" "description" ~}}\n' + + '| {{#if @col1}}{{>param-table-name}} | {{/if~}}\n' + + '{{#if @col2}}{{>linked-type-list types=type.names delimiter=" \\| " }} | {{/if~}}\n' + + '{{#if @col3}}{{>defaultvalue}} | {{/if~}}\n' + + '{{#if @col4}}{{{stripNewlines (inlineLinks description)}}} |{{/if}}\n' + + '{{/tableRow}}\n' + + '\n' + + '{{/if}}' ], [ - 'properties-table-html', - '{{#if properties~}}**Properties**\n\n\n \n \n {{#each (tableHeadHtml properties "name|Name" "type|Type" "defaultvalue|Default" "description|Description")}}{{/each}}\n \n \n \n {{#tableRow properties "name" "type" "defaultvalue" "description" ~}}\n \n {{#if @col1}}{{/if~}}\n {{#if @col2}}{{/if~}}\n {{#if @col3}}{{/if~}}\n {{#if @col4}}{{/if}}\n \n {{~/tableRow}}\n \n
{{this}}
{{>param-table-name}}{{>linked-type-list types=type.names delimiter=" | " html=true}}{{>defaultvalue}}{{{md (inlineLinks description)}}}
\n\n{{/if}}' + 'params-table-html', + '{{#if params}}\n' + + '\n' + + ' \n' + + ' \n' + + ' {{#each (tableHeadHtml params "name|Param" "type|Type" "defaultvalue|Default" "description|Description")}}{{/each}}\n' + + ' \n' + + ' \n' + + ' \n' + + ' {{#tableRow params "name" "type" "defaultvalue" "description" ~}}\n' + + ' \n' + + ' {{#if @col1}}{{/if~}}\n' + + ' {{#if @col2}}{{/if~}}\n' + + ' {{#if @col3}}{{/if~}}\n' + + ' {{#if @col4}}{{/if}}\n' + + ' \n' + + ' {{~/tableRow}}\n' + + ' \n' + + '
{{this}}
{{>param-table-name}}{{>linked-type-list types=type.names delimiter=" | " html=true}}{{>defaultvalue}}{{{md (inlineLinks description)}}}
\n' + + '\n' + + '{{/if}}' ], [ - 'properties-list', - '{{#if properties}}**Properties**\n\n{{#each properties~}}\n{{#if (regexp-test name "\\w+\\.\\w+")}} {{/if}}- {{{name}}} {{>linked-type-list types=type.names delimiter=" \\| " ~}}{{#if description}} - {{{inlineLinks description}}}{{/if}} \n{{/each}}\n\n{{/if~}}' + 'params-list', + '{{#if params}}\n' + + '{{#params}}**Params**\n' + + '\n' + + '{{#each this~}}\n' + + '{{indent}}- {{name}}{{#if type}} {{>linked-type-list types=type.names delimiter=" | " }}{{/if}}{{#unless (equal defaultvalue undefined)}} {{>defaultvalue equals=true ~}}{{/unless}}{{#if description}} - {{{inlineLinks description}}}{{/if}}\n' + + '{{/each}}\n' + + '\n' + + '{{/params~}}\n' + + '{{/if}}' ], [ - 'params', - '{{#if (optionEquals "param-list-format" "list")}}{{>params-list~}}{{/if~}}\n{{#if (optionEquals "param-list-format" "table")~}}\n{{#if (optionEquals "no-gfm" true)}}{{>params-table-html~}}{{else}}{{>params-table~}}{{/if~}}\n{{/if~}}\n' + 'param-table-name', + '{{#if optional}}[{{/if~}}\n' + + '{{#if variable}}...{{/if~}}\n' + + '{{{name}~}}\n' + + '{{#if optional}}]{{/if}}' ], [ - 'params-table', - '{{#if params}}\n\n{{tableHead params "name|Param" "type|Type" "defaultvalue|Default" "description|Description" ~}}\n\n{{#tableRow params "name" "type" "defaultvalue" "description" ~}}\n| {{#if @col1}}{{>param-table-name}} | {{/if~}}\n{{#if @col2}}{{>linked-type-list types=type.names delimiter=" \\| " }} | {{/if~}}\n{{#if @col3}}{{>defaultvalue}} | {{/if~}}\n{{#if @col4}}{{{stripNewlines (inlineLinks description)}}} |{{/if}}\n{{/tableRow}}\n\n{{/if}}' + 'properties', + '{{#if (optionEquals "property-list-format" "list")}}{{>properties-list~}}{{/if~}}\n' + + '{{#if (optionEquals "property-list-format" "table")~}}\n' + + ' {{#if (optionEquals "no-gfm" true)}}{{>properties-table-html}}{{else}}{{>properties-table}}{{/if~}}\n' + + '{{/if~}}\n' ], [ - 'params-table-html', - '{{#if params}}\n\n \n \n {{#each (tableHeadHtml params "name|Param" "type|Type" "defaultvalue|Default" "description|Description")}}{{/each}}\n \n \n \n {{#tableRow params "name" "type" "defaultvalue" "description" ~}}\n \n {{#if @col1}}{{/if~}}\n {{#if @col2}}{{/if~}}\n {{#if @col3}}{{/if~}}\n {{#if @col4}}{{/if}}\n \n {{~/tableRow}}\n \n
{{this}}
{{>param-table-name}}{{>linked-type-list types=type.names delimiter=" | " html=true}}{{>defaultvalue}}{{{md (inlineLinks description)}}}
\n\n{{/if}}' + 'properties-table', + '{{#if properties}}**Properties**\n' + + '\n' + + '{{tableHead properties "name|Name" "type|Type" "defaultvalue|Default" "description|Description" ~}}\n' + + '\n' + + '{{#tableRow properties "name" "type" "defaultvalue" "description" ~}}\n' + + '| {{#if @col1}}{{>param-table-name}} | {{/if~}}\n' + + '{{#if @col2}}{{>linked-type-list types=type.names delimiter=" \\| " }} | {{/if~}}\n' + + '{{#if @col3}}{{>defaultvalue}} | {{/if~}}\n' + + '{{#if @col4}}{{{stripNewlines (inlineLinks description)}}} |{{/if}}\n' + + '{{/tableRow}}\n' + + '\n' + + '{{/if}}' ], [ - 'params-list', - '{{#if params}}\n{{#params}}**Params**\n\n{{#each this~}}\n{{indent}}- {{name}}{{#if type}} {{>linked-type-list types=type.names delimiter=" | " }}{{/if}}{{#unless (equal defaultvalue undefined)}} {{>defaultvalue equals=true ~}}{{/unless}}{{#if description}} - {{{inlineLinks description}}}{{/if}}\n{{/each}}\n\n{{/params~}}\n{{/if}}' + 'properties-table-html', + '{{#if properties~}}**Properties**\n' + + '\n' + + '\n' + + ' \n' + + ' \n' + + ' {{#each (tableHeadHtml properties "name|Name" "type|Type" "defaultvalue|Default" "description|Description")}}{{/each}}\n' + + ' \n' + + ' \n' + + ' \n' + + ' {{#tableRow properties "name" "type" "defaultvalue" "description" ~}}\n' + + ' \n' + + ' {{#if @col1}}{{/if~}}\n' + + ' {{#if @col2}}{{/if~}}\n' + + ' {{#if @col3}}{{/if~}}\n' + + ' {{#if @col4}}{{/if}}\n' + + ' \n' + + ' {{~/tableRow}}\n' + + ' \n' + + '
{{this}}
{{>param-table-name}}{{>linked-type-list types=type.names delimiter=" | " html=true}}{{>defaultvalue}}{{{md (inlineLinks description)}}}
\n' + + '\n' + + '{{/if}}' ], [ - 'param-table-name', - '{{#if optional}}[{{/if~}}\n{{#if variable}}...{{/if~}}\n{{{name}~}}\n{{#if optional}}]{{/if}}' + 'properties-list', + '{{#if properties}}**Properties**\n' + + '\n' + + '{{#each properties~}}\n' + + '{{#if (regexp-test name "\\w+\\.\\w+")}} {{/if}}- {{{name}}} {{>linked-type-list types=type.names delimiter=" \\| " ~}}{{#if description}} - {{{inlineLinks description}}}{{/if}} \n' + + '{{/each}}\n' + + '\n' + + '{{/if~}}' ] ]