• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

my-doc-jsx-plugin-api: 一个my-doc-jsx插件,用于书写api文档使用。my-doc-jsx-plugi ...

原作者: [db:作者] 来自: 网络 收藏 邀请
<!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>

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap