-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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 TypeScript app creation #5550
Conversation
306775a
to
9782cb9
Compare
@@ -0,0 +1,26 @@ | |||
{ |
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.
Some notes: We would need to keep this in sync with the auto-generated tsconfig; and these comments will trigger a git diff if the user edit any property and rerun the server
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.
yeah, maybe a plain file would be better.
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.
On paths.js
we have template/
hard coded, should that change?
No, this is a separate template. |
* Add TypeScript app creation * Actually specify new extension * Check for ts and tsx * Fix types in default service worker file * Mirror changes in JS version of SW * Separate templates * Use separate template directory * Remove unused function * Add a tsconfig file to the template * Test install of typescript * Add e2e for TypeScript * Check for index.tsx to make sure we're not in the JS template * Ensure TypeScript doesn't leak into normal installs * Ignore some files * Print version of CRA * Fix script * Add new template * Move test to correct location * Use `verifyTypeScriptSetup` routine to populate files * Ensure tsconfig is created
I'm guessing this has no support for tslint, or am I mistaken? |
I tried this |
|
That worked. Thanks. |
* Add TypeScript app creation * Actually specify new extension * Check for ts and tsx * Fix types in default service worker file * Mirror changes in JS version of SW * Separate templates * Use separate template directory * Remove unused function * Add a tsconfig file to the template * Test install of typescript * Add e2e for TypeScript * Check for index.tsx to make sure we're not in the JS template * Ensure TypeScript doesn't leak into normal installs * Ignore some files * Print version of CRA * Fix script * Add new template * Move test to correct location * Use `verifyTypeScriptSetup` routine to populate files * Ensure tsconfig is created
* Add TypeScript app creation * Actually specify new extension * Check for ts and tsx * Fix types in default service worker file * Mirror changes in JS version of SW * Separate templates * Use separate template directory * Remove unused function * Add a tsconfig file to the template * Test install of typescript * Add e2e for TypeScript * Check for index.tsx to make sure we're not in the JS template * Ensure TypeScript doesn't leak into normal installs * Ignore some files * Print version of CRA * Fix script * Add new template * Move test to correct location * Use `verifyTypeScriptSetup` routine to populate files * Ensure tsconfig is created
This adds a
--typescript
flag to CRA. This flag will create an application with TypeScript instead of normal JavaScript.