npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

my-doc-jsx-plugin-api

v0.1.1

Published

my-doc-jsx的一个插件,用于根据注释、typescript接口生成api表格。

Downloads

7

Readme

my-doc-jsx-plugin-api

my-doc-jsx-plugin-api是一个my-doc-jsx的插件,用于生成API文档。

使用

npm instlal my-doc-jsx-plugin-api --D

如果是在nodejs或者浏览器中执行,使用jsxdoc的myDocJsx方法集成,nodejs:

const Plugin = require('my-doc-jsx-plugin-api')
myDocJsx.usePlugin(new Plugin)

浏览器中:

myDocJsx.usePlugin(new myDocJsxPluginAPI())

cli环境下使用

docjsx c html --plugin my-doc-jsx-plugin-api index.jsx ./

项目logo

用于展示项目的logo

npm信息

用于展示项目的logo,主要是基于img.shields.io这个网站来生成项目和npm相关的信息。

浏览器兼容性

用于生成一个展示项目浏览器兼容性表格的标签

注释生成函数文档

该功能可以将函数的注释生成为说明函数用途、参数、返回值的文档,以table表格的形式展示,具体使用方法为:

<api>{`
* 根据字符串模糊查询key,并返回匹配的缓存数组
* @param {string} searchText    key的模糊检索条件
* @return {Array<string>}      返回匹配的数组
`}</api>

生成的效果为:

根据字符串模糊查询key,并返回匹配的缓存数组

参数

|参数名|参数类型|参数说明| |-|-|-| |searchText|string|key的模糊检索条件|

返回值

|参数类型|参数说明| |-|-|-| |Array<string>|返回匹配的数组|

展示HTML形式的例子

该控件的功能为,运行HTML代码的显示效果,类似于jsfiddle这样的网站,不过该功能比jsfiddle简单很多,单机即可使用,同时可以展示HTML例子的代码。

该控件基于HTML的iframe标签总的srcdoc属性,因此在markdown、CSP策略中设置了child-src的页面、部分浏览器中无法使用。

具体使用方法为:

<html-example code>{
`
<div id="app">
    {{ message }}
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            message: '运行了vue!'
        }
    })
</script>
`
}</html-example>

效果为: