I am working on a rails project that has too many javascript files. Processing this script takes too much time. I want to remove the unnecessary javascript includes from my application. I am familiar with the plugins that can find u开发者_如何学Gonnecessary css but I haven't come across any method of finding unused javascript. If anyone has any idea regarding this please share.
Thanks
Are you referring to rjs (Rails-generated) or standard js files? If it's the latter then you can use jslint. For the first type you should have some integration tests that fail when you remove the RJS that is being used, if not you'll have to add those tests first.
For more see: Is there a tool to remove unused methods in javascript?
精彩评论