Code Monkey home page Code Monkey logo

dce.js's Introduction

DCE.js

简介

JavaScript 应用程序死代码消除工具。

使用方法

1. 安装依赖

确保安装 Node.js 及 yarn 的最新版本,在项目文件夹下运行 yarn 安装所有依赖。

2. 编译

执行 yarn build

3. 运行

在项目文件夹下运行:

node dist/DCE.js [options...] <directory>
  • --info-only 只在 stdout 输出寻找到的死代码函数信息,不对原始文件做出修改
  • -d <directory> 将处理后结果输出到指定目录下。不设定该选项将直接对原始文件做出修改
  • --help 输出帮助信息

项目进度

  • 2020.11.04 确定项目主题[1]
  • 2020.11.06 确定项目静态分析工具为 ACG.js 搭配 TAJS[2]
  • 2020.11.09 完成项目概览(Overview.md
  • 2020.11.09 对静态分析工具进行评估,放弃 TAJS(对目前 Web 应用支持欠佳)
  • 2020.11.17 修改项目概览(Overview.md);完成 HTMLProcessor 模块和 ScriptFileScanner 模块;放弃 ACG.js,决定基于 esprima 来进行静态调用分析

参考文献

[1] OBBINK N G, MALAVOLTA I, SCOCCIA G L等. An extensible approach for taming the challenges of JavaScript dead code elimination[C/OL]//2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE, 2018: 291–401. http://ieeexplore.ieee.org/document/8330226/. DOI:10.1109/SANER.2018.8330226.

[2] ANTAL G, HEGEDUS P, TOTH Z等. [Research Paper] Static JavaScript Call Graphs: A Comparative Study[C/OL]//2018 IEEE 18th International Working Conference on Source Code Analysis and Manipulation (SCAM). IEEE, 2018: 177–186. https://ieeexplore.ieee.org/document/8530732/. DOI:10.1109/SCAM.2018.00028.

dce.js's People

Contributors

soulike avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.