开发者

finding unused javascript in rails

开发者 https://www.devze.com 2023-02-03 19:16 出处:网络
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

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消