I am looking out for a software that identifies duplicate/redundant Javascript code. I found one such tool named CloneDR, but don't know how good it is .
I was looking out for similar open source tools . Please guide .
Find unused CSS and JS code with the new Coverage tab. When you load or run a page, the tab tells you how much code was used, versus how much was loaded. You can reduce the size of your pages by only shipping the code that you need.
发布评论
评论(3)
去年,我在一个项目中使用了 PMD 的复制/粘贴检测器 (CPD)。有一些代码 EcmascriptLanguage 支持,但我记得必须更新 GUI.java 并重新编译该项目以使其正常工作。
I used PMD's Copy/Paste Detector (CPD) last year on a project. There was some code for EcmascriptLanguage support but I recall having to update GUI.java and recompile the project to get it to work.
如果您使用 ruby(或者甚至系统上有它),您可能需要尝试 flay-js (flay 插件)
If you use ruby (or even have it on your system) you may want to try flay-js (flay plugin)
可能值得检查一下 Google Chrome 中相对较新的功能的覆盖范围部分:
https://developers.google.com/web/更新/2017/04/devtools-release-notes#coverage
It may be worth checking out the coverage section in Google Chrome, relatively new feature:
https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage