简体   繁体   中英

Tool for checking unused javascript plugins

I have inherited a javascript project which is referencing a lot of 3rd party plugin scripts, some of which, aren't used at all. Is there a tool out there which can check the codebase and flag plugins that aren't being referenced at all? That way I can delete them with confidence.

I'm trying to get the project nice and lean to take forwards.

If the project has code that's fired on user interaction, then I doubt you'll find a tool to do it for you. Having said that, most IDE's have tools to find unused code (code that isn't being referenced in your project) such as 'inspect code' in intelliJ.

To do it manually, you could add breakpoints in dev tools on the methods in the libs, if they don't fire you know your not using them (but again make sure code triggered by user interaction is tested too)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM