I'm playing around with jscodeshift.
My goal is to get count of all imports from a particular module in a project
import { Circle, Triangle, Rectangle } from 'geometry';
results in
{ Circle: 1, Triangle: 1, Rectangle: 1 }
I have kind of achieved what I wanted here But the only issue is that I want these stats for a whole project instead of single file.
Any idea how can I achieve this?
Not sure if I understand this correctly, are you trying to import everything from within a module without having to explicitly type their names (Circle, Triangle, etc)? Or this might help: