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

source-reader

v1.0.5

Published

A cli tool for read source

Downloads

10

Readme

source-reader

中文文档

A command line tool for reading source code more easier.(Only for js now.)

Project file structure, external module dependencies, and internal file module dependencies can be generated.

installation

npm install -g source-reader

Function

Generate project file structure

Is very simple to use:

source-reader tree

Or shorthand:

sr tree

The following effects can be achieved:

Support parameter configuration, the bottom layer uses [tree-cli] (https://github.com/MrRaindrop/tree-cli), so you can directly view its documentation. The node_modules, test folder is filtered by default, and the recursion level is 10.

More examples:

filter the bin and test folders:

source-reader tree --ignore bin,test

Show the external module dependency

Only supports viewing the dependencies of the npm package online now. Welcome to work together.

It is very simple, look at the dependencies of the current module (the directory where package.json is located):

source-reader outer

Or shorthand:

sr o

More examples:

View the dependencies of the specified library, such as koa-views

source-reader outer koa-views

Show the internal module dependency

The underlying layer is based on [madge] (https://github.com/pahen/madge) and can generate internal file module dependencies. Support json, dot, svg format. (If you need to use svg and dot, you need to install [grahpviz] (http://www.graphviz.org/) first).

Instructions:

The parameter is the entry file.

source-reader inner index.js

Or shorthand:

Sr i index.js

More examples:

Generate svg image

source-reader inner index.js --svg ./index.svg

Output dot format content

source-reader inner index.js --dot

generate source code document directly

Use the all command to generate the code source document.

source-reader all bin/mrgx.js

Or shorthand:

sr all bin/mrgx.js

The inner.svg and READ_SOURCE.md files will be generated in the root directory of project.

Automatically generate file structure, external module dependencies, and internal module dependencies.

The content of file:


# 源码分析

## 文件结构

/Users/liufang/openSource/brizer/multi-repo-git

├── CHANGELOG.md
├── bin
|  └── mrgx.js
├── lib
|  ├── cmd
|  |  └── index.js
|  ├── commander
|  |  └── index.js
|  ├── config

directory: * file: * symboliclink: *

ignored: directory (*)

## 外部模块依赖

请在: http://npm.broofa.com?q=mrgx 查看

## 内部模块依赖

![img](./inner.svg)
  

Usage (order by star)

sr used axios --page 3

If you need a lot of use (github will 403 if there is no token), please make sure that the environment variable GITHUB_TOKEN has been set to your own, I will get it through process.env.GITHUB_TOKEN.

Show files after publish in npm

sr-prepublish

Changelog

Change Log