Skip to content

Commit

Permalink
feat(canyon-data): update canyon-data
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Oct 16, 2024
1 parent 4e02a49 commit a82bf00
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/canyon-data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canyon-data",
"version": "0.1.1-alpha.9",
"version": "0.1.1-alpha.10",
"type": "module",
"main": "dist/canyon-data.cjs",
"module": "dist/canyon-data.js",
Expand All @@ -27,4 +27,4 @@
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-source-maps": "^5.0.6"
}
}
}
4 changes: 2 additions & 2 deletions packages/canyon-data/src/summary/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const getSummaryByPath = (
) => {
let summaryObj = JSON.parse(JSON.stringify(emptySummary));
const filterSummary = Object.keys(summary).reduce((pre: any, cur) => {
if (cur.startsWith(path+'/')||path==='') {
if (cur.startsWith(path+'/')||path===''||cur===path) {
pre[cur] = summary[cur];
}
return pre;
Expand Down Expand Up @@ -88,7 +88,7 @@ export const genSummaryTreeItem = (
if (path === '') {
return true;
}
return item.startsWith(path+'/');
return item.startsWith(path+'/')||item === path;
}

// 如果是文件
Expand Down
Empty file added plugins/inject-popup/README.md
Empty file.
9 changes: 9 additions & 0 deletions plugins/inject-popup/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// 入口函数
// 直接引入使用
//es5

// 功能
// 1. 点击页面5次弹出弹窗
// 2. 点击关闭按钮关闭弹窗
// 3. 弹窗内容是一个表单,展示项目信息,和覆盖率信息
// 4. 表单提交后,发送请求,将表单数据发送到后端
12 changes: 12 additions & 0 deletions plugins/inject-popup/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "inject-popup",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}

0 comments on commit a82bf00

Please sign in to comment.