I am currently working on a large Angular project and need to refactor some code by identifying dependencies between two specific folders/libs (using nx). Here is an example of the file structure:
/apps
/lib-1
a.service.ts
b.component.ts
/lib-2
/services
string-util.service.ts
/models
custom-a.model.ts
custom-b.model.ts
index.ts
/lib-3
date-util.service.ts
custom-c.model.Ts
In a.service.ts
:
import {StringUtilService} from '../lib-2/services/string-util.service.ts';
import {CustomA, CustomB} from '../lib-2/models';
import {CustomC} from '../lib-3/custom-c.model.ts';
import {DateUtilService} from '../lib-3/date-util.service.ts';
I am looking for a way, such as a script or tool, that can provide me with the dependencies if I specify "lib-1" and "lib-2". The expected result would be:
StringUtilService,
CustomAModel,
CustomBModel,
Are there any plugins or tools in Webstorm that can help me achieve this? Or another approach could be:
If I specify "lib-2" to my tool, it should give me the following result:
"StringUtilService" used in lib-1,
"CustomAModel" used in lib-1,
"CustomBModel" used in lib-1