-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e465727
commit 200f6e0
Showing
4 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* Express Marko Generator v1.0.4 | ||
* Express Marko Generator v1.0.5 | ||
* A CLI tool to generate an Expressjs application with MarkoJS and MaterializeCSS framework. | ||
* Written by: Sandeep Vattapparambil | ||
* Email: [email protected] | ||
|
@@ -48,7 +48,7 @@ const { | |
*/ | ||
const config = { | ||
name: 'Express Marko Generator', | ||
version: "1.0.4" | ||
version: "1.0.5" | ||
}; | ||
|
||
/** | ||
|
@@ -119,6 +119,75 @@ function generate() { | |
clone.on('close', function (code) { | ||
progress.stop(); | ||
log(chalk.green(`\nProject files downloaded successfully.`)); | ||
if (/^win/i.test(process.platform)) { | ||
/** | ||
* Windows cleanups | ||
*/ | ||
exec(`rmdir ${folderName}\\.git /s /q`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError removing .git folder, ${err}`)); | ||
} | ||
}); | ||
exec(`rmdir ${folderName}\\.github /s /q`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError removing .git folder, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}\\CODE_OF_CONDUCT.md /s /q`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}\\PULL_REQUEST_TEMPLATE.md /s /q`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}\\CONTRIBUTING.md /s /q`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}\\LICENSE /s /q`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
} else { | ||
/** | ||
* Cleanup in unix, mac, linux | ||
*/ | ||
exec(`rm ${folderName}/.git`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError removing .git folder, ${err}`)); | ||
} | ||
}); | ||
exec(`rm ${folderName}/.github`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError removing .git folder, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}/CODE_OF_CONDUCT.md`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}/PULL_REQUEST_TEMPLATE.md`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}/CONTRIBUTING.md`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
exec(`del ${folderName}/LICENSE`, function(err){ | ||
if(err){ | ||
log(chalk.red.bold(`\nError cleaning up the project, ${err}`)); | ||
} | ||
}); | ||
} | ||
let packageFiles = { | ||
files: [`${folderName}/package.json`, `${folderName}/package-lock.json`], | ||
from: 'experiment', | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters