Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/pinqy520/coverage-shaker
- Owner: pinqy520
- License: mit
- Created: 2021-01-17T12:58:02.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-17T15:29:28.000Z (almost 4 years ago)
- Last Synced: 2024-09-19T08:06:52.992Z (4 months ago)
- Topics: coverage, minify, puppeteer, shake, shaking, tree-shaking
- Language: TypeScript
- Homepage:
- Size: 122 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - coverage-shaker
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
```