Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pinqy520/coverage-shaker

Minify JavaScript code from chrome/puppeteer coverage report. tree shaking.
https://github.com/pinqy520/coverage-shaker

coverage minify puppeteer shake shaking tree-shaking

Last synced: about 2 months ago
JSON representation

Minify JavaScript code from chrome/puppeteer coverage report. tree shaking.

Awesome Lists containing this project

README

        

# Coverage Shaker

[![npm version](https://badge.fury.io/js/coverage-shaker.svg)](https://badge.fury.io/js/coverage-shaker)

```
$ npm install coverage-shaker -g
$ coverage-shaker
Usage: coverage-shaker [file]

选项:
--version 显示版本号
-f, --file files you want to minify, sg: lottie_canvas.js
-o, --output output dir, eg: ./output
--help 显示帮助信息
```

## Command line

```
$ coverage-shaker example/coverage-puppeteer.json -f=lottie_canvas.js -o=example
```

## Library

```javascript
import minify from 'coverage-shaker'
import report from './report.json'

const result = minify(report, ['lottie_canvas.js'])

console.log(result[0].code)
// Write code to a javascript file
```