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

gen-cli-for-docsify

v1.0.13

Published

a generate for docsify to auto generator some files

Downloads

3

Readme

gen-cli-for-docsify

这是一个用来为docsify自动生成站点侧边栏和项目更新日志的命令行工具

安装方法

$ npm install gen-cli-for-docsify -g

使用方法

生成侧边栏

$ gen sidebar doc

生成更新日志页面

$ gen log doc && gen style

配置日志文件与格式

支持从多个不同格式的日志文件生成统一的版本日志细览页。

配置支持:
  • package.json 中新增名为 'gen-cli-for-docsify' 的属性
  • .gen-cli-for-docsifyrc 配置文件
  • .gen-cli-for-docsifyrc.json 或者 .gen-cli-for-docsifyrc.yaml 或者 .gen-cli-for-docsifyrc.js.gen-cli-for-docsifyrc.cjs 文件
  • 遵循 CommonJS 模块化规范导出一个对象的 gen-cli-for-docsify.config.js 文件 或 gen-cli-for-docsify.config.cjs 文件
配置项
  • versionSrc: 数组,日志文件源文件列表,每一个成员对象有以下属性:

    • fileName: 文件名
    • versionReg: 版本名称匹配符,程序最终会使用 /^versionReg\s+/gi 正则来匹配日志文件中的版本名称
    • dateReg: 日期正则,程序最终会使用 /dateReg/gi 来匹配日志文件中的日期标题
  • versionTarget : 最终生成的版本细览页名称,要求以.html 扩展格式结尾

  • catMap: 对应文档目录的目录名和生成的侧边栏分类名的关系

  • excludeFiles: 哪些文件不需要加入侧边栏

配置示例:

.gen-cli-for-docsifyrc

{
  versionSrc: [
    {
      fileName: 'version.readme.md',
      versionReg: '####',
      dateReg: '-*-\d{8}-*',
    },
    {
      fileName: 'NEW.VERSION.README.md',
      versionReg: '#',
      dateReg: '###\s*\d{4}-\d{2}-\d{2}',
    },
  ],
  versionTarget: 'version.html',
  catMap: {
    'common': '通用',
    'components': '组件',
    'issues': '问题',
    'other': '其它',
  },
 excludeFiles: [
    'abc',
    '_coverpage.md',
    '_navbar.md',
    '_sidebar.md',
    '.nojekyll',
    'index.html',
    'README.md',
    'dir_to_md.js',
    'docres.md',
    'version.readme.md',
    '_media', 
    'layui', 
    'version.html'
  ]
}