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

md-map-plugin

v1.0.1

Published

MarkMap

Downloads

1

Readme

MarkMap

  • 动机

    • 市面上
      • markmap - 565 stars - svg(d3)
      • kityminder(百度脑图) - 717 stars - svg(d3)
      • markdown-to-mindmap - 13 stars
    • 缺陷
      • 均不能将多文件目录合并生成脑图
      • 对 ts 支持不好
  • 编译流程

    • 阶段一:获取完整 tree
      1. 根据 配置文件 拿到 入口md文件目录 、 单个md目录深度 、 输出文件目录
      2. md文件目录,生成文件目录 js tree1 (MDFileTransformer)
      3. 单个md目录,根据深度,生成文件目录 js tree2 (getDirTree)
      4. js tree2 拼接至 js tree1 对应目录下,得到完整 tree
    • 阶段二:根据完整 tree ,生成代码 5. 根据 tree 生成 html stream(customElement),写入 输出文件目录
  • 难点

    • 设计完整 tree 数据结构,需兼容直接传入结构,及由入口文件生成结构
    • 文件递归
    • 单个md目录标题递归
    • 完整 tree 数据结构编译成可交互界面
  • 技术栈

    • typescript
    • rollup / gulp 编译相关
    • 深度优先遍历算法
  1. 被动编译 MDMap.config.js script
  2. 主动编译