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

@fforres/cia

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fforres/cia

## Why

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Codebase import analyzer

Why

I wanted to structure a tool to analyze different codebases I'm currently working on. :)

We've all been there: Tou are working in a biiig react codebase. You also have a folder for multiple 'Button' components, under src/some-folder/components/buttons.tsx. One day, your team starts creating a new set of Buttons under src/design-system/buttons/index.tsx, your old buttons folder starts to slowly fade away into oblivion, and into the dreaded "legacy-code" folders.

So, I wanted to create a way to analyze your codebase to figure out:

  • where are specific modules are still being imported.
  • what things every file is importing.

The long-term idea for this:

  • To track this information repeatedly (run on CI for every prod build?)
  • Create data visualizations based on that data.
  • Figure out usage of modules:
    • Folders still in use
    • Usage of legacy modules
    • Track advances towards module deprecation/migrations

How

We are using "@babel/core" that runs with the current project babel configuration to extract the AST for every file, and do some analisys in them.

API

optiondescriptionrequireddefault values
-d, --directoryDirectory to analyze-----
-o, --outputPath to output analysis file./db
-a, --allowedExtensionsComma separated list of extensions to allow certain file extensions.js,.ts,.tsx,.jsx
-i, --ignoreComma separated list of glob patterns to ignore''

FAQs

Package last updated on 16 Dec 2019

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