unusedjs
查看js的有效使用情况:
https://github.com/gmetais/unusedjs
Installation
You need to open your console and write:
npm install unusedjs -g
Use
Start the server by writing in your console:
unused-js-proxyConfigure your browser's proxy to
localhost:3838. Only set the HTTP proxy, let the HTTPS (=SSL) proxy empty.Clear your browser cache <== IMPORTANT
Open your browser's and wait until the page is fully loaded
Open your browser's console and write
_unusedjs.report()
Results
Results are displayed in the console:

Why "(for the moment)"? Because the score might change if some more JS gets executed in the page.
Inspect what code is unused for one file (experimental)
_unusedjs.file(<file number>)
There are stille some bugs with very large files, especially when minified on one very long line. Best displayed on Chrome or Safari.

unusedjs的更多相关文章
随机推荐
- 大型运输行业实战_day10_1_自定义事务管理类
1.创建事务管理类 TransactionManager.java package com.day02.sation.transaction; import com.day02.sation.uti ...
- js join 与 split
var a = [] var b = [1,2,3] b.push('4') // b = [1,2,3,4] a = b.join('-') // a = '1-2-3-4' b = a.sp ...
- Python oct() 函数
Python oct() 函数 Python 内置函数 描述 oct() 函数将一个整数转换成8进制字符串. 语法 oct 语法: oct(x) 参数说明: x -- 整数. 返回值 返回8进制字符 ...
- 50. Pow(x, n) (INT; Divide-and-Conquer)
Implement pow(x, n). 思路:二分法,将每次相乘,转化成平方. class Solution { public: double myPow(double x, int n) { ) ...
- c++流操作
非缓冲标准出错流对象cerr和缓冲标准出错流对象clog,它们都是来自于ostream类的对象,用于输出错信息.cerr和clog之间的不同之处在于cerr是不经过缓冲区直接向显示器输出有关信息,而c ...
- mybatis框架入门程序:演示通过mybatis实现数据库的查询操作
我们现在工程基于的数据库见“https://www.cnblogs.com/wyhluckdog/p/10147754.html”这篇博文. 1.mybatis下载 mybatis的代码由githua ...
- Linux readelf命令
一.简介 readelf用来显示一个或者多个elf格式的目标文件的信息,可以通过它的选项来控制显示哪些信息.这里的elf-file(s)就表示那些被检查的文件.可以支持32位,64位的elf格式文件, ...
- Rakefile实例教程
一.简介 简单的说Rakefile就是使用Ruby语法的makefile, 对应make的工具就是rake. 在Ruby on Rails里面, 不管是数据库的初始化, 内容初始化, 删除, 还是测试 ...
- 在Excel中根据某一个单元格的出生日期自动精确计算年龄
=IF(MONTH(NOW())<MONTH(G4),INT(YEAR(NOW())-YEAR(G4))-1,IF(MONTH(NOW())>MONTH(G4),YEAR(NOW())-Y ...
- Socket-IO 系列(三)基于 NIO 的同步非阻塞式编程
Socket-IO 系列(三)基于 NIO 的同步非阻塞式编程 缓冲区(Buffer) 用于存储数据 通道(Channel) 用于传输数据 多路复用器(Selector) 用于轮询 Channel 状 ...