代码拉取完成,页面将自动刷新
<!doctype html><head><meta charset="utf-8"></head><style>.mydoc_h1{ margin: 0 0 1em; } .mydoc_h1_a{ color: #2c3e50; text-decoration: none; font-size: 2em; } .mydoc_h1_h1{ margin: 45px 0 8px; padding-bottom: 7px; font-size: 28px; } .mydoc_h1_content{ }.mydoc_p{ line-height: 1.6em; margin: 1.2em 0 -1.2em; padding-bottom: 1.2em; position: relative; z-index: 1; color: #333; }.mydoc_h2{ margin: 35px 0 0.8em; } .mydoc_h2_a{ font-size: 1.5em; text-decoration: none; color: #2c3e50; } .mydoc_h2_a::before{ content: ''; display: block; margin-top: -40px; height: 40px; visibility: hidden; } .mydoc_h2_h2{ margin: 5px 0 8px; border-bottom: 1px solid #ddd; font-size: 22px; padding-bottom: 1em; } .mydoc_h2_content{ }/** * prism.js default theme for JavaScript, CSS and HTML * Based on dabblet (http://dabblet.com) * @author Lea Verou */ code[class*="language-"], pre[class*="language-"] { color: black; background: none; text-shadow: 0 1px white; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; word-wrap: normal; line-height: 1.5; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none; } pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { text-shadow: none; background: #b3d4fc; } pre[class*="language-"]::selection, pre[class*="language-"] ::selection, code[class*="language-"]::selection, code[class*="language-"] ::selection { text-shadow: none; background: #b3d4fc; } @media print { code[class*="language-"], pre[class*="language-"] { text-shadow: none; } } /* Code blocks */ pre[class*="language-"] { padding: 1em; margin: .5em 0; overflow: auto; } :not(pre) > code[class*="language-"], pre[class*="language-"] { background: #f5f2f0; } /* Inline code */ :not(pre) > code[class*="language-"] { padding: .1em; border-radius: .3em; white-space: normal; } .token.comment, .token.prolog, .token.doctype, .token.cdata { color: slategray; } .token.punctuation { color: #999; } .namespace { opacity: .7; } .token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.deleted { color: #905; } .token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #690; } .token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #a67f59; background: hsla(0, 0%, 100%, .5); } .token.atrule, .token.attr-value, .token.keyword { color: #07a; } .token.function { color: #DD4A68; } .token.regex, .token.important, .token.variable { color: #e90; } .token.important, .token.bold { font-weight: bold; } .token.italic { font-style: italic; } .token.entity { cursor: help; } .mydoc_code{ overflow-x: auto; position: relative; background-color: #f8f8f8; padding: 0; line-height: 1.1em; border-radius: 2px; margin: 1.2em 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AgMAAABHkjHhAAAACVBMVEWAgIBaWlo+Pj7rTFvWAAAAA3RSTlMHCAw+VhR4AAAA+klEQVQoz4WSMW7EQAhFPxKWNh2FCx+HkaZI6RRb5DYbyVfIJXLKDCFoMbaTKSw/8ZnPAPjaH2xgZcUNUDADD7D9LtDBCLZ45fbkvo/30K8yeI64pPwl6znd/3n/Oe93P3ho9qeh72btTFzqkz0rsJle8Zr81OLEwZ1dv/713uWqvu2pl+k0fy7MWtj9r/tN5q/02z89qa/L4Dc2LvM93kezPfXlME/O86EbY/V9GB9ePX8G1/6W+/9h1dq/HGfTfzT3j/xNo7522Bfnqe5jO/fvhVthlfk434v3iO9zG/UOphyPeinPl1J8Gtaa7xPTa/Dk+RIs4deMvwGvcGsmsCvJ0AAAAABJRU5ErkJggg=='); } .mydoc_code_pre{ padding: 1.2em 1.4em; line-height: 1.5em; margin: 0; }.mydoc{ font-size: 14px; overflow: hidden; }</style> <article class='mydoc'> <div class="mydoc_h1"> <a class="mydoc_h1_a"> <h1 class="mydoc_h1_h1">my-doc-jsx-plugin-api</h1> </a> <div class="mydoc_h1_content"> </div> </div><p class="mydoc_p"> my-doc-jsx-plugin-api是一个my-doc-jsx的插件,用于生成API文档。</p><div class="mydoc_h2"> <a class="mydoc_h2_a"> <h2 class="mydoc_h2_h2">安装</h2> </a> <div class="mydoc_h2_content"> <p class="mydoc_p"> 从npm上面安装:</p><figure class='mydoc_code'> <pre class="mydoc_code_pre cm-s-eclipse">npm instlal my<span class="token operator">-</span>doc<span class="token operator">-</span>jsx<span class="token operator">-</span>plugin<span class="token operator">-</span>api <span class="token operator">--</span>D</pre> </figure><p class="mydoc_p"> 如果是在nodejs或者浏览器中执行,使用jsxdoc的myDocJsx方法集成,nodejs:</p><figure class='mydoc_code'> <pre class="mydoc_code_pre cm-s-eclipse"><span class="token keyword">const</span> Plugin <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'my-doc-jsx-plugin-api'</span><span class="token punctuation">)</span> myDocJsx<span class="token punctuation">.</span><span class="token function">usePlugin</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">Plugin</span><span class="token punctuation">)</span></pre> </figure><p class="mydoc_p"> 浏览器中:</p><figure class='mydoc_code'> <pre class="mydoc_code_pre cm-s-eclipse">myDocJsx<span class="token punctuation">.</span><span class="token function">usePlugin</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">myDocJsxPluginAPI</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre> </figure><p class="mydoc_p"> cli环境下使用</p><figure class='mydoc_code'> <pre class="mydoc_code_pre cm-s-eclipse">docjsx c html <span class="token operator">--</span>plugin my<span class="token operator">-</span>doc<span class="token operator">-</span>jsx<span class="token operator">-</span>plugin<span class="token operator">-</span>api index<span class="token punctuation">.</span>jsx <span class="token punctuation">.</span><span class="token operator">/</span></pre> </figure> </div> </div><div class="mydoc_h2"> <a class="mydoc_h2_a"> <h2 class="mydoc_h2_h2">注释生成函数文档</h2> </a> <div class="mydoc_h2_content"> <p class="mydoc_p"> 该功能可以将函数的注释生成为说明函数用途、参数、返回值的文档,以table表格的形式展示,具体使用方法为:</p><figure class='mydoc_code'> <pre class="mydoc_code_pre cm-s-eclipse"><span class="token operator"><</span>api<span class="token operator">></span><span class="token punctuation">{</span><span class="token template-string"><span class="token string">` * 根据字符串模糊查询key,并返回匹配的缓存数组 * @param {string} searchText key的模糊检索条件 * @return {Array<string>} 返回匹配的数组 `</span></span><span class="token punctuation">}</span><span class="token operator"><</span><span class="token operator">/</span>api<span class="token operator">></span></pre> </figure><p class="mydoc_p"> 生成的效果为:</p> </div> </div> </article>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型