js-code-detector 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
# js-code-detector
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
## 说明
|
|
4
|
+
1.重复代码检测工具, 支持 React、Vue 项目
|
|
5
|
+
2.git分支对比报告, 目前适用于 umi4.x 版本的项目
|
|
5
6
|
|
|
6
|
-
## Install
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
$ yarn install
|
|
10
|
-
```
|
|
8
|
+
## 重复代码检测使用
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
10
|
+
1.项目安装 **js-code-detector**
|
|
11
|
+
2.package.json 中添加 scripts 命令 ```sameCodeDetect```, 例如:```"same": "sameCodeDetect"```
|
|
12
|
+
3.执行该命令可在当前项目目录下生成报告, ```npm run same```
|
|
16
13
|
|
|
17
|
-
##
|
|
14
|
+
## git分支对比报告使用
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
1.项目安装 **js-code-detector**
|
|
17
|
+
2.package.json 中添加 scripts 命令 ```detect```, 例如:```"detect": "detect"```
|
|
18
|
+
3.执行该命令可在当前项目目录下生成报告, ```npm run detect```
|
|
21
19
|
|
|
22
|
-
##
|
|
20
|
+
## 重复代码检测报告说明
|
|
21
|
+
1.所有相似的代码片段为一组,每组有2个及以上的代码片段
|
|
22
|
+
2.每组代码片段都有对应的文件路径,以及所在的行范围
|
|
23
23
|
|
|
24
|
-
1.项目安装 **js-code-detector**
|
|
25
|
-
2.package.json 中添加 scripts 命令 ```detect```
|
|
26
|
-
3.执行该命令可在当前项目目录下生成报告
|
|
27
24
|
|
|
28
|
-
##
|
|
25
|
+
## git分支对比报告说明
|
|
29
26
|
- filePath 文件路径
|
|
30
27
|
- type 改动类型 add remove modify
|
|
31
28
|
- filesDependsOnMe 依赖当前文件的文件
|