Skip to content

Commit

Permalink
Branch dev and first commit is created / README.md gets empty
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoulloao committed Oct 5, 2020
1 parent 4694ec1 commit 2c72ebc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
package-lock.json
.vscode
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
.gitignore
.npmrc
README.md
.vscode
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bananasplit-js",
"version": "1.0.0",
"version": "1.1.0",
"description": "A bananasplit client for command line",
"main": "src/index.js",
"bin": {
Expand Down
21 changes: 14 additions & 7 deletions src/lib/create-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ export default function ({ action, project_name, apollo, git }) {
const clone = shell.exec( `git clone -b ${branch} https://github.com/bananasplit-js/bananasplit-js ${project_name}` )

if ( clone.code === 0 ) {
shell.rm([ `${project_name}/README.md`, `${project_name}/LICENSE` ])
shell.rm( '-rf', `${project_name}/.git` )
shell.rm( '-rf', `${project_name}/.github` )

if ( git )
shell.exec( `cd ${project_name} && git init` )
;
// Browse to project directory
shell.cd( project_name )

shell.rm([ 'LICENSE' ])
shell.mv( '.env.example', '.env' )
shell.exec( 'echo "" > README.md' )
shell.rm( '-rf', '.git' )
shell.rm( '-rf', '.github' )

if ( git ) {
shell.exec( `git init` )
shell.exec( 'git checkout -b dev' )
shell.exec( 'git add --all && git commit -am "Start"' )
}

let infoBox = []

Expand Down

0 comments on commit 2c72ebc

Please sign in to comment.