File tree Expand file tree Collapse file tree 3 files changed +212
-206
lines changed Expand file tree Collapse file tree 3 files changed +212
-206
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
- const shell = require ( "shelljs " ) ;
2
+ const { execaSync } = require ( "execa " ) ;
3
3
const fs = require ( "fs" ) ;
4
4
const path = require ( "path" ) ;
5
5
@@ -11,18 +11,24 @@ if (!projectName) {
11
11
}
12
12
13
13
// Clone the repository
14
- shell . exec (
15
- `git clone git@github.com:mattfsourcecode/fastify-swc-typescript-server.git ${ projectName } `
14
+ execaSync (
15
+ "git" ,
16
+ [
17
+ "clone" ,
18
+ "git@github.com:mattfsourcecode/fastify-swc-typescript-server.git" ,
19
+ projectName ,
20
+ ] ,
21
+ { stdio : "inherit" }
16
22
) ;
17
23
18
24
// Navigate to the cloned directory
19
- shell . cd ( projectName ) ;
25
+ process . chdir ( projectName ) ;
20
26
21
27
// Remove the original .git directory
22
- shell . rm ( "-rf" , " .git") ;
28
+ fs . rmSync ( " .git", { recursive : true , force : true } ) ;
23
29
24
30
// Initialize a new git repository
25
- shell . exec ( "git init" ) ;
31
+ execaSync ( "git" , [ " init"] , { stdio : "inherit" } ) ;
26
32
27
33
// Update package.json
28
34
const packageJsonPath = path . join ( process . cwd ( ) , "package.json" ) ;
Original file line number Diff line number Diff line change 39
39
"prepare" : " husky install"
40
40
},
41
41
"dependencies" : {
42
- "shelljs " : " ^0.8.5 "
42
+ "execa " : " ^9.5.2 "
43
43
},
44
44
"devDependencies" : {
45
- "chai" : " ^4.5.0 " ,
46
- "husky" : " ^8.0.3 " ,
47
- "mocha" : " ^10.7.3 " ,
48
- "rimraf" : " ^5 .0.10 "
45
+ "chai" : " ^5.1.2 " ,
46
+ "husky" : " ^9.1.7 " ,
47
+ "mocha" : " ^11.1.0 " ,
48
+ "rimraf" : " ^6 .0.1 "
49
49
},
50
50
"bin" : {
51
51
"fastify-swc-server" : " init.js"
You can’t perform that action at this time.
0 commit comments