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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lough/docs-cli

v0.1.2

Published

This is a Docs tool docked in lough.

Readme

@lough/docs-cli

This is a Docs tool docked in lough.

一款集成了 TypeScriptJSDoc 的强大文档生成工具,旨在简化创建和维护项目文档的过程。

Feature

  • 基于 TypeScript:直接使用 TypeScript 源文件,利用 TypeScript 强大的类型系统,为文档提供准确而丰富的信息。
  • 自动生成 API 文档:从 TypeScript 代码和 JSDoc 注释自动生成 API 文档,包括类、接口、函数等。
  • 命令行界面 (CLI):提供简单直观的 CLI,轻松生成文档。
  • 支持 Markdown:生成的文档为 Markdown 格式,方便与各种版本控制平台和文档工具集成。

Install

全局安装

npm install @lough/docs-cli -g

局部安装

npm install @lough/docs-cli -D

CMD

Command

lough-docs [options] [command]

generate docs by typescript.

options:

  • "-t, --type [string...]", "generate type: Array<api | cmd>", string[]
  • "-i, --input [string]", "generate file input directory or typescript file, if type is api default is tsconfig input, else default is src/commands."
  • "-o, --output [string]", "generate file output directory or markdown file, default is README.md."
  • "-q, --quite [boolean]", "execute the program silently.", false

action: (options: GenerateOptions) => Promise<void>

init

init lough-docs in project.

options:

  • "-pt, --projectType [string]", "classLib | componentLib | nodeClassLib | cli, if quite is true, default is classLib."
  • "-q, --quite [boolean]", "execute the program silently.", false

action: (options: InitOptions) => Promise<void>

Interface

InitOptions 初始化选项

members

| 属性 | 说明 | 类型 | | ---- | ---- | ------- | | projectType | 项目类型 如果为静默模式,默认为类库 classLib | PROJECT_TYPE | | quite | 静默 是否开启静默模式 | boolean |

GenerateOptions 生成选项

members

| 属性 | 说明 | 类型 | | ---- | ---- | ------- | | type | 生成类型 | GENERATE_TYPE[] | | input | 入口文件或目录 相对于 process.cwd() | string | | output | 输出文件或目录 相对于 process.cwd() | string | | quite | 静默 是否开启静默模式 | boolean |

API

Class

GenerateFlow 生成流

parameters

| 属性 | 说明 | 必传 | 类型 | 默认值 | | ---- | ----- | ---- | -------- | ------ | | parameters | - | 是 | GenerateFlowParameters | - |

returns: GenerateFlow

members

| 属性 | 说明 | 类型 | 标记 | | ---- | ----- | -------- | -------- | | parse | 解析文件 | () => AllDeclaration[] | | | make | 制作文档 | (declarationList: AllDeclaration[]) => string | | | save | 保存文件 | (markdown: string) => void | | | pipeline | 流水线 | () => void | |

InitFlow 初始化流

parameters

| 属性 | 说明 | 必传 | 类型 | 默认值 | | ---- | ----- | ---- | -------- | ------ | | parameters | - | 是 | InitFlowParameters | - |

returns: InitFlow

members

| 属性 | 说明 | 类型 | 标记 | | ---- | ----- | -------- | -------- | | install | 安装 | () => void | | | configure | 配置 | () => void | | | pipeline | 流水线 | () => void | |

Enum

GENERATE_TYPE 生成类型

members

| 属性 | 说明 | 值 | | ---- | ---- | ------- | | 'api' | API文档 | 'api' | | 'cmd' | 命令文档 | 'cmd' |

PROJECT_TYPE 项目类型

members

| 属性 | 说明 | 值 | | ---- | ---- | ------- | | classLib | 类库 | 'classLib' | | componentLib | 组件库 | 'componentLib' | | nodeClassLib | Node 类库 | 'nodeClassLib' | | cli | 脚手架 | 'cli' |

Interface

GenerateFlowLifeCycle 生成流生命周期

members

| 属性 | 说明 | 类型 | | ---- | ---- | ------- | | parse | 解析开始 | () => any | | parsing | 解析中 | (filePath: string) => any | | parsed | 解析结束 | () => any | | make | 制作开始 | () => any | | made | 制作结束 | () => any | | save | 保存结束 | () => any | | saved | 保存开始 | (filePath: string) => any |

GenerateFlowParameters 生成流参数

members

| 属性 | 说明 | 类型 | | ---- | ---- | ------- | | type | 生成类型 | GENERATE_TYPE | | input | 入口文件或目录 完整路径 | string | | output | 输出目录 完整路径 | string | | cycle | 生命周期 | GenerateFlowLifeCycle |

InitFlowLifeCycle 初始化流生命周期

members

| 属性 | 说明 | 类型 | | ---- | ---- | ------- | | install | 安装开始 | () => any | | installed | 安装结束 | () => any | | configure | 配置开始 | () => any | | configured | 配置结束 | () => any |

InitFlowParameters 初始化流参数

members

| 属性 | 说明 | 类型 | | ---- | ---- | ------- | | projectType | 项目类型 | PROJECT_TYPE | | cycle | 生命周期 | InitFlowLifeCycle |