Open Algram opened 5 years ago
I can help with styled components.
I can port it to TypeScript
The frontend is fairly doable since it runs through webpack and we can easily add a ts-loader in there.
The server will be a bit trickier, I'm afraid you have to move it out of src/
or somehow compile it differently because node won't be able to run .ts
files.
You have two options here
ts-node
that just runs .ts
files. Although I'm not a big fan of this, last time I tried it, it was buggypackage.json
and tsconfig.json
. But this implies you need to modify your Dockerfile in order to build both server & frontend and put them together.Also, it'd be a great idea to move everything to async/await
since you're doing TypeScript. No need to resort to callbacks.
Yeah I figured this would be a problem. We could also do server side rendering and then compile the project all at once with a single tsconfig.json
.
For the refactoring: I wanted to do that for a long time now but haven't found the time for it yet, feel free to do this. As long as you adhere to proper linting and keep the core functionality I will approve of it.
Just as a quick heads up, Babel handles transpiling TypeScript now as well, although I haven't handled transpiling both .ts
and .tsx
before but it should be fine.
Yep this works, I am doing this at work already in a prod environment.
I'd like to move this project to Typescript and Styled components. Feel free to contribute! The linting should be done with eslint.