File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -14,19 +14,26 @@ if (!repo) {
1414const repoUrl = `https://github.com/pr4j3sh/${ repo } .git` ;
1515const projectName = args [ 1 ] || repo ;
1616
17+ const rm = [
18+ ".git" ,
19+ ".github" ,
20+ "LICENSE" ,
21+ "CODE_OF_CONDUCT.md" ,
22+ "CONTRIBUTING.md" ,
23+ "Dockerfile" ,
24+ ] ;
25+
1726try {
1827 execSync ( `git clone ${ repoUrl } ${ projectName } ` , { stdio : "inherit" } ) ;
1928 if ( projectName !== "." ) {
2029 chdir ( projectName ) ;
2130 }
2231
23- rmSync ( ".git" , { recursive : true , force : true } ) ;
24- if ( existsSync ( ".github" ) ) {
25- rmSync ( ".github" , { recursive : true , force : true } ) ;
26- }
27- if ( existsSync ( "LICENSE" ) ) {
28- rmSync ( "LICENSE" , { recursive : true , force : true } ) ;
29- }
32+ rm . forEach ( ( item ) => {
33+ if ( existsSync ( item ) ) {
34+ rmSync ( item , { recursive : true , force : true } ) ;
35+ }
36+ } ) ;
3037
3138 if ( existsSync ( "package.json" ) ) {
3239 console . log ( "" ) ;
4754 }
4855 console . log ( " npm run dev" ) ;
4956} catch ( error ) {
57+ console . error ( error ) ;
5058 exit ( 1 ) ;
5159}
Original file line number Diff line number Diff line change 11{
22 "name" : " @pr4j3sh/create-frames" ,
3- "version" : " 1.0.11 " ,
3+ "version" : " 1.0.12 " ,
44 "description" : " frames CLI tool for cloning templates" ,
55 "main" : " dist/bundle.js" ,
66 "bin" : {
You can’t perform that action at this time.
0 commit comments