zoukankan      html  css  js  c++  java
  • unusedjs

    查看js的有效使用情况:

    https://github.com/gmetais/unusedjs

    Installation

    You need to open your console and write:

    npm install unusedjs -g

    Use

    1. Start the server by writing in your console: unused-js-proxy

    2. Configure your browser's proxy to localhost:3838. Only set the HTTP proxy, let the HTTPS (=SSL) proxy empty.

    3. Clear your browser cache <== IMPORTANT

    4. Open your browser's and wait until the page is fully loaded

    5. Open your browser's console and write _unusedjs.report()

    Results

    Results are displayed in the console:

    screenshot

    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.

    screenshot

  • 相关阅读:
    django ajax使用
    vim--分屏快捷键
    django csrf
    django mysql使用
    官方文档地址
    图解http 学习
    Terms
    Data Center Group
    Misc
    FTDI CDM Drivers 2.06.00
  • 原文地址:https://www.cnblogs.com/river2005/p/5960530.html
Copyright © 2011-2022 走看看