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

@linyjs/plugin-docs

v0.0.24

Published

Plugin development documentation and examples for linyjs framework

Downloads

1,026

Readme

@linyjs/plugin-docs

适用于 linyjs v0.x

查看其他版本: v1.x | v2.x

📖 简介

@linyjs/plugin-docs 是 linyjs 框架的官方插件开发文档和示例包,提供:

  • 结构化文档 - 从入门到进阶的完整教程
  • 可运行示例 - 3个完整的插件示例项目
  • API参考 - 详细的接口文档和类型定义
  • 最佳实践 - 行业标准的开发规范

🚀 快速开始

安装

npm install @linyjs/plugin-docs

访问文档

文档位于 node_modules/@linyjs/plugin-docs/docs/ 目录:

# 查看入门教程
cat node_modules/@linyjs/plugin-docs/docs/getting-started/quick-start.md

# 查看API参考
ls node_modules/@linyjs/plugin-docs/docs/api-reference/

快速创建插件项目

使用 CLI 工具创建新的插件项目:

# 创建新的插件项目
npx @linyjs/cli init my-plugin
cd my-plugin
npm install

# 进入开发模式
npx @linyjs/cli dev

CLI 工具会自动创建完整的项目结构,包含 package.json、TypeScript 配置和示例代码。

生成示例项目

使用 CLI 工具生成示例项目:

# 生成 Hello World 示例
npx @linyjs/cli example hello-world

# 生成博客插件示例
npx @linyjs/cli example blog-plugin -o ./my-blog

📚 文档结构

docs/
├── getting-started/          # 入门教程
│   ├── quick-start.md        # 快速开始
│   ├── installation.md       # 安装指南
│   └── first-plugin.md       # 第一个插件
├── guides/                   # 进阶指南
│   ├── server-module.md      # 服务端模块
│   ├── dependency-injection.md # 依赖注入机制
│   ├── shared-module-interface.md # shared-module-interface 类型包
│   ├── client-module.md      # 客户端模块
│   ├── client-routes.md      # 前端页面路由
│   ├── client-hooks.md       # 公共 Hooks 使用
│   ├── state-management.md   # 前端状态管理
│   ├── ui-slots.md           # UI扩展插槽
│   ├── permissions.md        # 权限管理
│   ├── data-persistence.md   # 数据持久化
│   └── authentication.md     # 用户认证
├── api-reference/            # API参考
│   └── index.md              # 接口定义(含依赖注入接口)
├── best-practices/           # 最佳实践
│   ├── naming-conventions.md
│   ├── service-definition.md  # ServiceDef 代码风格规范
│   ├── error-handling.md
│   ├── performance.md
│   └── security.md
└── faq.md                    # 常见问题

💡 示例项目

examples/
├── hello-world/          # 最简示例(一个API + 一个页面)
├── blog-plugin/          # 完整博客插件(CRUD + 权限)
└── analytics-plugin/     # 数据分析插件(定时任务 + 可视化)

每个示例都是完整的、可独立运行的插件项目,包含:

  • 完整的 TypeScript 代码
  • package.json 和 tsconfig.json 配置
  • 详细的 README 说明
  • 可直接打包为 .mpk 文件

🔧 核心模块

linyjs 提供了以下核心模块,插件可以通过依赖注入方式调用这些基础服务:

@linyjs/mdb

MongoDB 数据库服务

@linyjs/auth

用户认证系统

  • 支持用户注册、登录、Token 验证
  • 提供 JWT 身份验证
  • 详情:认证指南

@linyjs/permission

权限管理系统

📖 核心模块指南

📄 许可证

MIT License