Algram / ytdl-webserver

📻 Webserver for downloading youtube videos. Ready for docker.
MIT License
1.44k stars 140 forks source link

Move to Typescript and Styled components #30

Open Algram opened 5 years ago

Algram commented 5 years ago

I'd like to move this project to Typescript and Styled components. Feel free to contribute! The linting should be done with eslint.

murbar commented 5 years ago

I can help with styled components.

emanuelmd commented 5 years ago

I can port it to TypeScript

emanuelmd commented 5 years ago

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

emanuelmd commented 5 years ago

Also, it'd be a great idea to move everything to async/await since you're doing TypeScript. No need to resort to callbacks.

Algram commented 5 years ago

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.

wilsonj806 commented 5 years ago

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.

Algram commented 5 years ago

Yep this works, I am doing this at work already in a prod environment.