File tree Expand file tree Collapse file tree 4 files changed +25
-24
lines changed Expand file tree Collapse file tree 4 files changed +25
-24
lines changed Original file line number Diff line number Diff line change @@ -362,10 +362,10 @@ codeg impsort
362
362
### API 模式
363
363
364
364
``` typescript
365
- import { impSort } from " code-genius " ;
365
+ import { impSort } from " ../src/index " ;
366
366
367
367
(async () => {
368
- await impSort ([" ./api-model/test.ts " ]);
368
+ await impSort ([" ./src " ]);
369
369
})();
370
370
```
371
371
Original file line number Diff line number Diff line change 1
1
import { impSort } from "../src/index" ;
2
2
3
3
( async ( ) => {
4
- await impSort ( [ "./api-model/test.ts " ] ) ;
4
+ await impSort ( [ "./src " ] ) ;
5
5
} ) ( ) ;
Original file line number Diff line number Diff line change 1
1
import cac from "cac" ;
2
2
3
3
import { cmdInstaller , handleError } from "@/helper" ;
4
- import config from "@/index" ;
4
+ import { config } from "@/index" ;
5
5
6
6
import pkg from "../package.json" ;
7
7
Original file line number Diff line number Diff line change @@ -28,10 +28,31 @@ import rootInstaller, { root } from "@/command/root";
28
28
import templateInstaller , { template } from "@/command/template" ;
29
29
import { defineConfig } from "@/helper" ;
30
30
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
+
31
51
export {
32
52
checkGitUserEmail ,
33
53
checkGitUserName ,
34
54
clear ,
55
+ config ,
35
56
createProject ,
36
57
eslintFix ,
37
58
gitCommit ,
@@ -48,23 +69,3 @@ export {
48
69
setGitUserName ,
49
70
template ,
50
71
} ;
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
- } ) ;
You can’t perform that action at this time.
0 commit comments