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/create react app v4 #229

Merged
merged 3 commits into from
Oct 26, 2020
Merged

Feat/create react app v4 #229

merged 3 commits into from
Oct 26, 2020

Conversation

kcwinner
Copy link
Contributor

@kcwinner kcwinner commented Oct 26, 2020

Issue #, if available: 158

Description of changes:

  • Adds new project react
  • Adds new project react-ts
  • Adds a new option to tsconfig options that react expects - allowSyntheticDefaultImports

Something to discuss - should the output files use:

  1. fs.writeFileSync(path.join(srcdir, 'logo.svg'), logoSvg.join('\n')); - just joins the string array
  2. new ReactAppTest(this.project, path.join(srcdir, 'App.test.' + this.fileExt)); - extends FileBase

I left both options as examples in the code. Either to swap either way.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mergify mergify bot merged commit 911b893 into projen:master Oct 26, 2020
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Sorry haven't seen the comment yet

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Apologies I merged to quickly. Let's discuss your question over a subsequent PR

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

See response


fs.mkdirpSync(assetsdir);

const indexHtml = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Might make sense to store this in a separate file and fs.readFile

'export default reportWebVitals;',
];

fs.mkdirpSync(srcdir);
Copy link
Contributor

Choose a reason for hiding this comment

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

See the PR @mbonig is working on. I think we'll have something like SampleDir which will accept multiple files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can go back and clean this up once that PR is in!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks

mergify bot pushed a commit that referenced this pull request Oct 26, 2020
*Issue #, if available:* N/A

*Description of changes:* Fix currently failing build caused by merging of #228 and #229 to master

Also fixed categorization of some commands

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
@eladb eladb mentioned this pull request Oct 27, 2020
mergify bot pushed a commit that referenced this pull request Nov 23, 2020
Addresses some comments from #229

I ran `diff` against the two folders to check the same files are generated.
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