Socket
Socket
Sign inDemoInstall

anadep

Package Overview
Dependencies
91
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anadep

A lib can help you find all dependencies of the js file, also jsx,ts,tsx file.


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Anadep

Analyze Dependencies

A lib can help you find all dependencies of the js file, also jsx,ts,tsx file.

Install

# with npm
npm install -g anadep

# or yarn/pnpm ...

Of course, the simplest way is to use npx.

npx anadep [file]

Usage

$ anadep help
anadep <file> [option]

analyze file

Positionals:
  file  path to target file                                             [string]

Options:
      --version  Show version number                                   [boolean]
  -p, --port     server port                                     [default: 5555]
  -o, --output   output format                       [choices: "json", "stdout"]
  -h, --help     Show help                                             [boolean]

Usage example

1. Inspect the result in you browser

# run
$ anadep ./src/LockScreen.tsx
You can inspect the result in you browser. http://localhost:5555

# you can use -p=3000 to set the port to 3000.

then open http://localhost:5555 in the browser, you can double click on the graph node to open it in vscode.

Demo image

2. Print all dependent files

this is very useful when you want to pipe the result in terminal.

$ anadep ./src/LockScreen.tsx -o=stdout
/user/xx/WorkSpace/react-iphone/src/LockScreen.tsx
/user/xx/WorkSpace/WebstormProjects/react-iphone/src/hooks/use-measure.ts
# ......

3. Save the tree of dependencies as json

$ anadep ./src/LockScreen.tsx -o=json
# then you can find a file `output.json` in your pwd.

Keywords

FAQs

Last updated on 03 Apr 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc