Skip to content

Commit

Permalink
feat(Package): Try to fix running problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Ventura committed Mar 6, 2020
1 parent ef37409 commit 50fafc6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "0.1.5",
"author": "Guilherme Ventura de Souza",
"license": "MIT",
"person": {
"name": "Guilherme Ventura de Souza",
"email": "[email protected]",
"url": "https://github.com/venturalp"
},
"bin": {
"update-linters": "lib/index.js"
},
Expand Down Expand Up @@ -52,7 +57,7 @@
"fs": false
},
"files": [
"lib"
"lib/"
],
"engines": {
"node": ">=10"
Expand Down
12 changes: 6 additions & 6 deletions src/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function execAsync(command, startMsg, endMsg) {
console.log(`⚠️ stderr: ${stderr}`)
}
if (!stdout) {
console.log(` ${endMsg} finished`)
console.log(` ${endMsg} finished`)
resolve({ error, stdout, stderr })
} else {
console.log(`${stdout}\n ${endMsg} finished`)
console.log(`${stdout}\n ${endMsg} finished`)
resolve({ error, stdout, stderr })
}
})
Expand All @@ -35,8 +35,8 @@ function execCommand(command, startMsg, endMsg) {
return
}
if (stderr) console.log(`⚠️ stderr: ${stderr}`)
if (!stdout) console.log(` ${endMsg} finished`)
else console.log(`${stdout}\n ${endMsg} finished`)
if (!stdout) console.log(` ${endMsg} finished`)
else console.log(`${stdout}\n ${endMsg} finished`)
})
}

Expand Down Expand Up @@ -119,7 +119,7 @@ async function updateJSFile(flag, fileSource, msgLog, config) {
console.log(errMsg)
reject(errMsg)
}
const msg = ` Update ${msgLog} settings finished successfully`
const msg = ` Update ${msgLog} settings finished successfully`
console.log(msg)
resolve(msg)
},
Expand All @@ -139,7 +139,7 @@ function copyConfig(flag, path, msgLog, { mainPath, targetPath }) {
new Promise((resolve, reject) => {
ncp(`${mainPath}/files/${path}`, `${targetPath}/${path}`, err => {
if (err) reject(`❌ Failed to copy ${msgLog} settings\n${err}`)
else resolve(` ${msgLog} settings copied successfully`)
else resolve(` ${msgLog} settings copied successfully`)
})
})
.then(value => console.log(`${value}`))
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function updateDependencies() {
console.log(errMsg)
reject(errMsg)
}
const msg = ' Update dependecies finished successfully'
const msg = ' Update dependecies finished successfully'
console.log(msg)
resolve(msg)
},
Expand Down

0 comments on commit 50fafc6

Please sign in to comment.