gkz / grasp

JavaScript structural search, replace, and refactor
http://graspjs.com
MIT License
1.28k stars 33 forks source link

How to locate globals #88

Open elmart opened 8 years ago

elmart commented 8 years ago

I have to modularize a codebase previously written the old way (using globals). This is, I have to, given a file, locate every reference to a global, and insert the corresponding require at the beginning of the file. How could the first part (locating every global reference) be done using graspjs?

Keep your hard work. This seems promising. Thanks.