加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT
<!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">&lt;</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&lt;string>}      返回匹配的数组
`</span></span><span class="token punctuation">}</span><span class="token operator">&lt;</span><span class="token operator">/</span>api<span class="token operator">></span></pre>
                </figure><p class="mydoc_p"> 生成的效果为:</p>
                    </div>
                </div>
</article>
MIT License Copyright (c) 2016 laden666666 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

一个my-doc-jsx插件,用于书写api文档使用。my-doc-jsx-plugin-api可以基于注释及部分代码,生成对应语言的api文档。目前仅支持javascript和typescript两种语言 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化