Skip to content

Commit

Permalink
updates and version bumped to 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandeepv68 committed Jun 12, 2018
1 parent e465727 commit 200f6e0
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
![express-marko-logo](https://raw.githubusercontent.com/SandeepVattapparambil/express-marko-generator/master/logo.png)
# Express Marko Generator v1.0.4
# Express Marko Generator v1.0.5
A generic CLI tool to generate an Expressjs application with MarkoJS and MaterializeCSS framework.
> **Note:** Please note that this CLI tool is not an official ebay project.
> **Note:** This tool is yet to be tested on UNIX/Linux & Mac. Works fine on Windows. Please open issues if you encounter one.
# Installation
### NPM
```sh
Expand Down
73 changes: 71 additions & 2 deletions index.js
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]
Expand Down Expand Up @@ -48,7 +48,7 @@ const {
*/
const config = {
name: 'Express Marko Generator',
version: "1.0.4"
version: "1.0.5"
};

/**
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "express-marko-generator",
"version": "1.0.4",
"version": "1.0.5",
"description": "A CLI tool to generate an Expressjs application with MarkoJS and MaterializeCSS framework",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 200f6e0

Please sign in to comment.