-
Notifications
You must be signed in to change notification settings - Fork 60
Description
HI @glato,
Thanks for making emerge. I'm trying to use it on our large TypeScript codebase (>10k files). I need to exclude 150k third-party imported files which are stored in node_modules directories.
When node_modules files are included, the graph structure is dominated by them. For example, in this screenshot, the blue constellation in the center is a file that imports from the @smithy/types library and the library files around it. The orange in the lower-left is the AWS client library. The halo around the graph are unused files from third-party libraries.
I tried using the ignore_dependencies_containing option in the config file, but it doesn't work for node_modules:
---
project_name: ts
loglevel: info
analyses:
- analysis_name: ts
source_directory: /Users/user/src/
only_permit_languages:
- typescript
only_permit_file_extensions:
- .ts
- .tsx
ignore_dependencies_containing:
- node_modules
file_scan:
- number_of_methods
- source_lines_of_code
- dependency_graph
- fan_in_out
- louvain_modularity
- tfidf
export:
- directory: /Users/user/emerge-export
- graphml
- json
- tabular_file
- tabular_console_overall
- d3Ideally, the tool would have an ignore_node_modules boolean option which defaults to true. Another option is to have an exclude_file_patterns option which we can set to **/node_modules/**.
Sincerely, Michael
