Skip to content

Commit 1f362ac

Browse files
committed
🔧 chore(app): 小修复
1 parent 3b923b6 commit 1f362ac

File tree

4 files changed

+25
-24
lines changed

4 files changed

+25
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,10 @@ codeg impsort
362362
### API 模式
363363

364364
```typescript
365-
import { impSort } from "code-genius";
365+
import { impSort } from "../src/index";
366366

367367
(async () => {
368-
await impSort(["./api-model/test.ts"]);
368+
await impSort(["./src"]);
369369
})();
370370
```
371371

api-model/api-impsort.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { impSort } from "../src/index";
22

33
(async () => {
4-
await impSort(["./api-model/test.ts"]);
4+
await impSort(["./src"]);
55
})();

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import cac from "cac";
22

33
import { cmdInstaller, handleError } from "@/helper";
4-
import config from "@/index";
4+
import { config } from "@/index";
55

66
import pkg from "../package.json";
77

src/index.ts

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,31 @@ import rootInstaller, { root } from "@/command/root";
2828
import templateInstaller, { template } from "@/command/template";
2929
import { defineConfig } from "@/helper";
3030

31+
const config = defineConfig({
32+
plugins: [
33+
rootInstaller,
34+
gitCommitInstaller,
35+
gitCommitVerifyInstaller,
36+
gitUserInstaller,
37+
gitInitSimpleHooksInstaller,
38+
npmRegistryInstaller,
39+
clearInstaller,
40+
npmDepCheckInstaller,
41+
eslintFixInstaller,
42+
impSortInstaller,
43+
prettierFormatInstaller,
44+
createProjectInstaller,
45+
templateInstaller,
46+
lighthouseInstaller,
47+
quantityInstaller,
48+
],
49+
});
50+
3151
export {
3252
checkGitUserEmail,
3353
checkGitUserName,
3454
clear,
55+
config,
3556
createProject,
3657
eslintFix,
3758
gitCommit,
@@ -48,23 +69,3 @@ export {
4869
setGitUserName,
4970
template,
5071
};
51-
52-
export default defineConfig({
53-
plugins: [
54-
rootInstaller,
55-
gitCommitInstaller,
56-
gitCommitVerifyInstaller,
57-
gitUserInstaller,
58-
gitInitSimpleHooksInstaller,
59-
npmRegistryInstaller,
60-
clearInstaller,
61-
npmDepCheckInstaller,
62-
eslintFixInstaller,
63-
impSortInstaller,
64-
prettierFormatInstaller,
65-
createProjectInstaller,
66-
templateInstaller,
67-
lighthouseInstaller,
68-
quantityInstaller,
69-
],
70-
});

0 commit comments

Comments
 (0)