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

Add script to compile source TypeScript #25

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

chaance
Copy link
Contributor

@chaance chaance commented Nov 28, 2020

npm run compile will compile everything in apps and courses into a compiled directory. TypeScript will be compiled to javascript, while everything else will be copied as-is.

Everything should be compiled as close to the source as possible. The only thing that kind of sucks is that the TS compiler cannot preserve whitespace, so even with prettier the output might not look exactly the same as you might intend.

This won't affect any of the existing curriculum code (other than the fact that I updated prettier, but feel free to revert if you'd like). To test this, you can rename apps/YesterTech/App.js to apps/YesterTech/App.tsx, run the script, and check the output file compiled/apps/YesterTech/App.js.

@bradwestfall bradwestfall merged commit af87471 into ReactTraining:master Dec 9, 2020
@bradwestfall
Copy link
Collaborator

@chaance works great 🎉

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

Successfully merging this pull request may close these issues.

None yet

2 participants