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的更多相关文章
随机推荐
- IRanges package
1)介绍 在分析序列时,我们通常对特定的连续子序列感兴趣. 例如,a矢量可以被认为是按字母顺序排列的小写字母序列. 我们将第一个五个字母(a到e)称为连续的子序列,而仅包含元音的子序列不会是连续的. ...
- function方法控制是否隐藏部分内容
$(document).ready(function() { $('input[type=radio][name=IE]').change(function() { if (this.value == ...
- JAVA知识积累 给HttpClient添加Socks代理
本文描述http client使用socks代理过程中需要注意的几个方面:1,socks5支持用户密码授权:2,支持https:3,支持让代理服务器解析DNS: 使用代理创建Socket 从原理上来看 ...
- N皇后问题12 · N-Queens
[抄题]: n皇后问题是将n个皇后放置在n*n的棋盘上,皇后彼此之间不能相互攻击. 给定一个整数n,返回所有不同的n皇后问题的解决方案. 每个解决方案包含一个明确的n皇后放置布局,其中“Q”和“.”分 ...
- iOS - 工程文件冲突 - 解决方式
- [leetcode]349. Intersection of Two Arrays数组交集
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1 ...
- Web站点性能拨测脚本
功能:检测自己本地访问目标网站的返回状态.访问质量信息 [root@localhost src]# cat get_site_status.sh #! /usr/bin/env bash if [[ ...
- Spring框架的IOC核心功能快速入门
2. 步骤一:下载Spring框架的开发包 * 官网:http://spring.io/ * 下载地址:http://repo.springsource.org/libs-release-local/ ...
- .NET 发送邮件
//邮件配置 public static string mail_smtp = System.Configuration.ConfigurationManager.AppSettings[" ...
- win7系统administrator用户提示没有管理员权限,造装驱动安装错误,软件无法使用
警告1909.无法创建快捷方式 最近使用windows 7 32位安装软件,好多都失败.出现以上类似错误. 解决方法:在系统盘(C:)右键属性“安全”选项卡--“编辑”,添加“Everyone”设置为 ...