npm-introspect

2.0.2 • Public • Published

npm-introspect

🔎 Introspect is a tool to examine and visualize NPM packages and the quality of your project's dependencies.

gif of introspect being launched

Installation

npm i npm-introspect -g

Usage

introspect [packages to analyze] [port]

Run introspect in the root directory of any project you are interested in analyzing. It will parse the package.json and return a visualization of your project's dependencies. If it doesn't find a package.json it will launch with a default package, d3, and output a message in the terminal that it was unable to find a packge.json. If you want to analyze a specific package or packages instead of parsing the package.json you can type those package names like introspect react react-native and it will visualize those packages and skip the package.json.

introspect [noDev] [port]

Development dependencies like testing frameworks and module bundlers are common across many packages and not necessarily what you are looking for when exploring NPM. To launch npm-introspect without showing the development dependencies use the -d flag or -noDev option.

introspect [less] [port]

If you want to run introspect with less overhead use the -less option, or -l flag. With the -l flag introspect will output scores to the terminal and not startup a server.

Example

introspect d3 d3-zoom d3-selection eslint through -p 5000

image of introspect visualization

Here is an example with the less option

introspect -l

png of introspect with less option

The Problem

NPM is the largest and fastest growing repository of code. NPM makes creating and uploading modules easy and it noursihes a culture of recombination, soft forks, experimentation. The Unix philosiphy, systems of plugins, and wide use of Javascript are fundamental to one of the most interesting ecosystems of code. The problem, is that solutions to search and exploit the best new ideas in NPM must develop commensurate to the mass of packages.

Particularly for beginners, which many Javascript developers are, there are few good ways to know the long-term support, and quality of a repository. Communities of open source developers need good tools to make collective decisions and converge on repositories to support. One of the greatest strengths of the Python community is their tendency to create a single solution. For a given programming problem, for example database management, Python has one modular solution, which means beginners know which repo to use, they have some guarantee of good support, and developers efforts will go towards supporting one good solution rather than working on several solutions with varying levels of success.

NPM's sprawling ecosystem needs equivalent support for searching and identifying quality repositories.

The Solution

NPMS is an effort to clearly signal code quality so that the NPM community can converge on the best modules to use and maintain. NPMS computes scores for npm modules across quality, maintenance, and popularity. NPM-introspect is a tool that uses the NPMS scores and other NPM package data to create rich visualizations to explore the packages and the NPM ecosystem. Run introspect in your project root and it will parse the packages in your package.json and launch the visualization locally. There is also a command to skip the visualization and output the most important data to the command line.

Promote a transparent and more functional open source ecosystem. Use npm-introspect and NPMS

License

MIT

Dependents (0)

Package Sidebar

Install

npm i npm-introspect

Weekly Downloads

0

Version

2.0.2

License

MIT

Last publish

Collaborators

  • nohmapp