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

feat: Add CRA Generator #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat: Add CRA Generator #4

wants to merge 3 commits into from

Conversation

yashpandit
Copy link
Contributor

Pull Request Template

Description

Adds a CRA generator.

Fixes #3

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit Test
  • Integration Test

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yashpandit yashpandit requested a review from doowb January 13, 2020 06:54
Copy link
Member

@doowb doowb left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! There are a few things that I made comments about inline. (mostly syntax that matches the style of our code in other projects).

Everything else looks good so far, thanks!

generator.js Outdated
// return if the generator is already registered
if (!isValid(app, 'generate-react')) return;

app.use(require('generate-project'));
app.register(
Copy link
Member

Choose a reason for hiding this comment

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

Please keep arguments on the same line when calling functions like this.

lib/constants.js Outdated
@@ -0,0 +1,17 @@
module.exports = {
YARN: "yarn",
Copy link
Member

Choose a reason for hiding this comment

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

Please use single quotes in JavaScript files.

@@ -0,0 +1,45 @@
const spawn = require("../spawn");
Copy link
Member

Choose a reason for hiding this comment

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

Please use single quotes in JavaScript files. I think all of the uses in here should be single quotes.

package.json Outdated
"is-valid-app": "^0.3.0"
"is-valid-app": "^0.3.0",
"enquirer": "^2.3.2",
"generate": "^0.14.0",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that generate should be a dependency. I think it can be a devDependency.

@yashpandit
Copy link
Contributor Author

Fixed everything as per your suggestion. Please review.

@yashpandit yashpandit requested a review from doowb January 14, 2020 12:55
@yashpandit yashpandit self-assigned this Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Create CRA Generator
2 participants