@fforres/cia
## Why
Last updated 5 months ago by fforres .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fforres/cia 
SYNC missed versions from official npm registry.

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

option description required default values
-d, --directory Directory to analyze -----
-o, --output Path to output analysis file ./db
-a, --allowedExtensions Comma separated list of extensions to allow certain file extensions .js,.ts,.tsx,.jsx
-i, --ignore Comma separated list of glob patterns to ignore ''

Current Tags

  • 0.0.0                                ...           latest (5 months ago)

1 Versions

  • 0.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |