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

@tnotesjs/core

v0.1.15

Published

TNotes 知识库核心框架 —— 基于 VitePress 的笔记管理系统

Downloads

2,868

Readme

@tnotesjs/core

TNotes 知识库系统的核心框架,以 NPM 包形式发布,被所有 TNotes.xxx 知识库引用。

简介

@tnotesjs/core 包含了 TNotes 知识库系统的 CLI 命令、VitePress 配置/主题、服务层、工具函数等核心代码。各 TNotes.xxx 仓库通过 npm install @tnotesjs/core 安装即可使用。

目录结构

@tnotesjs/core
├── commands/           # CLI 命令(dev、build、push、update 等)
├── config/             # 配置管理(ConfigManager、默认配置、模板)
├── core/               # 核心模块(GitManager、NoteManager、ReadmeGenerator 等)
├── services/           # 服务层(file-watcher、git、note、readme、vitepress 等)
├── types/              # TypeScript 类型定义
├── utils/              # 工具函数(日志、文件操作、Markdown 解析、校验等)
├── vitepress/          # VitePress 主题、组件、插件、样式
│   ├── components/     # 自定义 Vue 组件
│   ├── config/         # VitePress 配置(defineNotesConfig)
│   ├── plugins/        # VitePress 插件
│   └── theme/          # 主题入口与样式
├── index.ts            # CLI 入口
└── src/index.ts        # 公共 API 导出

安装

# 安装核心包
pnpm add @tnotesjs/core

# 安装 peerDependencies
pnpm add -D vite vitepress vue

使用方式

VitePress 配置

// .vitepress/config.mts
import { defineNotesConfig } from '@tnotesjs/core/vitepress/config'
export default defineNotesConfig()

VitePress 主题

// .vitepress/theme/index.ts
export { default } from '@tnotesjs/core/vitepress/theme'

CLI 命令

package.json 中配置脚本:

{
  "scripts": {
    "tn:dev": "tnotes --dev",
    "tn:build": "tnotes --build",
    "tn:preview": "tnotes --preview",
    "tn:update": "tnotes --update",
    "tn:push": "tnotes --push",
    "tn:pull": "tnotes --pull",
    "tn:create-notes": "tnotes --create-notes",
    "tn:fix-timestamps": "tnotes --fix-timestamps",
    "tn:help": "tnotes --help"
  }
}

版本管理

许可证

MIT