-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add check for overwrite readme #143
Conversation
Hi @kefranabg , there is no unit test yet, but I would be glad to have your opinion about my implementation. I'll do tests if you are agree with it. |
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 24 25 +1
Lines 197 206 +9
Branches 21 23 +2
=====================================
+ Hits 197 206 +9
Continue to review full report at Codecov.
|
Add check for overwrite readme #140
Implem looks good to me, I think you can go ahead! I'll do a full review ASAP |
Done ! I added tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/ask-overwrite.js
Outdated
const question = { | ||
type: 'list', | ||
message: | ||
'⚠ Readme-md-generator will overwrite your current README.md. Are you sure you want to continue? ', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'⚠ Readme-md-generator will overwrite your current README.md. Are you sure you want to continue? ', | |
'⚠ readme-md-generator will overwrite your current README file. Are you sure you want to continue? ', |
src/ask-overwrite.spec.js
Outdated
const expectedQuestion = { | ||
type: 'list', | ||
message: | ||
'⚠ Readme-md-generator will overwrite your current README.md. Are you sure you want to continue? ', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'⚠ Readme-md-generator will overwrite your current README.md. Are you sure you want to continue? ', | |
'⚠ readme-md-generator will overwrite your current README file. Are you sure you want to continue? ', |
* | ||
* @param {Object} args | ||
*/ | ||
module.exports = async ({ customTemplatePath, useDefaultAnswers }) => { | ||
if (!(await readme.checkOverwriteReadme())) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!(await readme.checkOverwriteReadme())) return | |
if (!(await readme.checkOverwriteReadme())) return | |
Thanks buddy |
Add check for overwrite readme #140