Skip to content
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

Zulu coda test and refactor #4

Merged
merged 45 commits into from
Feb 25, 2018
Merged

Conversation

zulucoda
Copy link
Collaborator

  • refactoring by moving source into src/ folder
  • created generator-utils
  • adding tests
  • adding lint-stage & husky for prettier
  • adding getRootPath function which retrieves root folder by using resolve on commander module
  • update README.md

To Test PR clone this REPO: https://github.com/zulucoda/Generate-React-Code-PR-Test

… create all templates will have to be refactored to by using async each series in order to be able to add callback which will be called once everything has been completed! ✊
Copy link
Collaborator Author

@zulucoda zulucoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dude, i think we should have merged PR after the tests pass (2e19c8a).

then add these other changes to a new PR.

@@ -141,7 +141,7 @@ function removeComments(s) {
return s.replace(/([\s\S]*?)\/\*[\s\S]*?\*\//g, '$1');
}

function createTemplate(directory, placeholderNames, omitComments) {
function createTemplate(directory, placeholderNames, omitComments, callback) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dude this breaks test

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be return callback(err, 'code generated from template');

@zulucoda
Copy link
Collaborator Author

its cool, I fixed the merge issue

… refactored to use a callback so that it can be test friendly ✊
@zulucoda
Copy link
Collaborator Author

okay great back to green 👍

@JPStrydom
Copy link
Owner

The one test doesn't clean up after itself. We'll have to fix that first.

We'll also have to write some apply-config-file tests.

@zulucoda
Copy link
Collaborator Author

Yeah, finally all green 👍

@zulucoda
Copy link
Collaborator Author

ok cool build is green, lets get this ONE merged 👍

Copy link
Owner

@JPStrydom JPStrydom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :neckbeard:

@JPStrydom JPStrydom merged commit be41170 into master Feb 25, 2018
@JPStrydom JPStrydom deleted the zulu-coda-test-and-refactor branch February 25, 2018 23:27
@JPStrydom JPStrydom mentioned this pull request Feb 25, 2018
@zulucoda
Copy link
Collaborator Author

you gonna npm publish ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants