-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
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.
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( |
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.
Please keep arguments on the same line when calling functions like this.
lib/constants.js
Outdated
@@ -0,0 +1,17 @@ | |||
module.exports = { | |||
YARN: "yarn", |
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.
Please use single quotes in JavaScript files.
lib/generators/create-react-app.js
Outdated
@@ -0,0 +1,45 @@ | |||
const spawn = require("../spawn"); |
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.
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", |
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.
I don't think that generate
should be a dependency
. I think it can be a devDependency
.
Fixed everything as per your suggestion. Please review. |
Pull Request Template
Description
Adds a CRA generator.
Fixes #3
Type of change
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
Checklist