Git Product home page Git Product logo

npa-tool's Introduction

NPM Package Analysis Tool

🌾 About The Project

项目变大,依赖变多之后,npm的包依赖关系会变得非常非常复杂,常常让我们看不清:

  • 为什么会安装某个特定 package;
  • 为什么某些 package 会安装多个版本;
  • 子 package 之间形成了怎样的父子依赖关系;
  • 是否存在循环依赖;
  • 等等。

npa-tool是一个开源的命令行界面交互工具, 能从项目的package.json出发, 得到项目的所有包依赖关系, 并可视化展现。

📦Installation

npm install -g npa-tool

🔨 Usage

$ npa-cli analyze -h              
                
Usage: npa-cli analyze [options] [root-path]

分析指定目录的包依赖关系

Arguments:
  root-path           解析的项目根目录, 默认为当前目录

Options:
  --depth <depth>     向下递归分析的层次深度
  --json <json-path>  将依赖关系以json形式存储到指定的文件
  -h, --help          display help for command

示例

npa-cli analyze   // 当前目录必须为npm项目目录
npa-cli analyze --json="./result.json" --depth=5  // 限制分析深度, 将结果保存到json文件中
npa-cli analyze --depth=10 ./packages/project1    // 指定分析目录, 限制分析深度

✨ Features

npa-tool

📝 Applicability

npm 😊

yarn 😊

pnpm 😊

monorepo 😊


windows 😊

linux ?

⌨️ Development Guide

开发文档

npa-tool's People

Contributors

sliverfox-pudding avatar sxxhlxxdb avatar trudbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

npa-tool's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.