Skip to content

Commit 09545e8

Browse files
committed
refactor(app): 重构
1 parent b00250b commit 09545e8

File tree

7 files changed

+364
-30
lines changed

7 files changed

+364
-30
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
1-
# @codegenius/lighthouse-plugin
1+
# @codegenius/lighthouse-plugin
2+
3+
运行 `lighthouse` 分析及收集 **Web** 应用的性能指标
4+
5+
## 安装
6+
7+
``` bash
8+
npm i @codegenius/lighthouse-plugin -D
9+
```
10+
11+
```javascript
12+
import { defineConfig } from "code-genius";
13+
import { lighthouseInstaller } from "@codegenius/lighthouse-plugin";
14+
15+
export default defineConfig({
16+
plugins: [
17+
lighthouseInstaller(),
18+
],
19+
});
20+
```
21+
22+
## 使用
23+
24+
### 命令模式
25+
26+
```bash
27+
# 分析及收集 **baidu** 应用的性能指标
28+
codeg lighthouse --url https://www.baidu.com
29+
```
30+
31+
| 选项 | 描述 |
32+
| ------------------- | ------------ |
33+
| --url \<url\> | Web 应用地址 |
34+
35+
### API 模式
36+
37+
```typescript
38+
import { lighthouse } from "@codegenius/lighthouse-plugin";
39+
40+
(async () => {
41+
await lighthouse("https://www.baidu.com");
42+
})();
43+
```

codeg.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from "code-genius";
2+
import { gitInitSimpleHooksInstaller } from "@codegenius/hooks-plugin";
3+
4+
export default defineConfig({
5+
plugins: [
6+
gitInitSimpleHooksInstaller(),
7+
],
8+
});

0 commit comments

Comments
 (0)