# cover-effect

> 代码影响范围评估工具

Latest version **0.0.1-beta-4** (published 2020-08-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install cover-effect
pnpm add cover-effect
yarn add cover-effect
bun add cover-effect
```

Provides the command `cover`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-beta-4 |
| Published | 2020-08-14 |
| First published | 2020-08-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 23.9 KB |
| Known vulnerabilities | 0 (+9 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | shimingwen |
| Maintainers | shimingwen |

## Links

- npm: https://www.npmjs.com/package/cover-effect
- Repository: https://github.com/shimingw/cover-effect
- Issues: https://github.com/shimingw/cover-effect/issues
- npm.io page: https://npm.io/package/cover-effect

## Dependencies (8)

- [ejs](https://npm.io/package/ejs.md) ^3.1.3
- [simple-git](https://npm.io/package/simple-git.md) ^2.6.0
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.10.2
- [util-promisify](https://npm.io/package/util-promisify.md) ^2.1.0
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.10.1
- [babel-plugin-jsx](https://npm.io/package/babel-plugin-jsx.md) ^1.2.0
- [vue-template-compiler](https://npm.io/package/vue-template-compiler.md) ^2.6.11
- [@babel/plugin-syntax-class-properties](https://npm.io/package/@babel/plugin-syntax-class-properties.md) ^7.10.1

## Recent versions

- 0.0.1-beta-4 (latest) — 2020-08-14
- 0.0.1-beta-3 — 2020-08-12
- 0.0.1-beta-2 — 2020-08-04
- 0.0.1-beta.2 — 2020-08-04
- 0.0.1-beta.1 — 2020-08-04

## README

## 介绍

这是一个代码影响范围评估工具，可以对两个分支的`diff`文件，进行分析，获取每个文件的依赖影响以及文件描述。本工具支持对`.vue`、`.jsx`、`.js`文件进行分析

## 安装

`npm install -save-dev cover-effect`

## 配置
**配置文件**

安装根目录下创建`.cover.js`配置文件
```js
const path = require('path')

module.exports = {
  entry: './index.js',  // 项目入口
  oldBranch: 'test',    // 需要对比的老分支
  newBranch: 'master',  // 需要对比的新分支
  alias:{               // 配置webpack中的路径别名
    '@a': path.join(__dirname, 'src', 'moduleA'),
    '@b': path.join(__dirname, 'src', 'moduleB'),
  }
}
```

**文件描述配置**

在文件中以块级注释的形式配置文件描述，目前仅支持一下字段的文件描述（文件描述、创建者、创建时间、最后修改时间、最后修改人）。后续可进行自定义配置

```js
/*
 * @Description: 入口文件
 * @Author: shimingwen
 * @Date: 2020-06-04 14:35:31
 * @LastEditTime: 2020-06-04 18:01:39
 * @LastEditors: shimingwen
 */ 
```

## 使用
在根目录下执行`npx cover`，即可生成名为`depAnalyse.html`的依赖分析文件。

---
_Source: https://npm.io/package/cover-effect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
