Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scan-deps-tree

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scan-deps-tree

扫描项目依赖,构建项目依赖树

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

scanDepsTree

扫描js模块依赖树

简介

从一个入口文件出发, 递归构建模块依赖树。常用于文件依赖分析、代码治理等方向,支持js、ts、tsx、.vue等丰富的模块类型。

安装

npm i scan-deps-tree -D

使用

  1. 命令行使用
npx scan xxx.js //分析的路径

执行完会在当前目录创建depTree.json文件

  1. 导出函数使用
import scanDepsTree from 'scan-deps-tree'

const depTree = scanDepsTree('./src/index.ts',{
    resolveAlias:{ // webpack中配置的路径别名
        @:'xxx'
    },
    skipTypeImport: true // 是否忽略import type xxx的模块声明。默认为true
})
console.log(depTree)

Keywords

FAQs

Package last updated on 09 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc