Elderjs / template

Elder.js template project. It is part template, part tutorial. Dive in!
https://elderjs.pages.dev/
MIT License
113 stars 33 forks source link

Typescript version of the template #10

Closed dephiros closed 3 years ago

dephiros commented 4 years ago

I am trying out elder js and see mentions of typescript in the doc. Is there a version of the template that supports Typescript out of the box?

Thank you for an awesome project

nickreese commented 4 years ago

@dephiros There isn't a ts template. I tried building one the day after typescript for svelte was released and kept hitting issues that were preventing me from shipping... mainly because I was unfamiliar with TS.

That said, we do look for a tsconfig and will pick up the build folder if it exists. The entire template was in TS before I hit the snags trying to get TS to work in Svelte.

dephiros commented 4 years ago

Thank you @nickreese. As svelte is adopting TS more, maybe we can get some help to get the TS version working

akvadrako commented 4 years ago

There are still some mentions of Typescript, like to hooks.ts in getting-started.md. Maybe it would be nice to mention in the README what the plan is with Typescript - is it moving in that direction or away from it?

nickreese commented 4 years ago

@akvadrako I’d love to support TS long term. That said, I’m a novice compared to how comfortable I am in pure js and would prefer a real TS enthusiast help show me what a good TS template would look like.

nickreese commented 3 years ago

As an update to this. For v1+ of Elder.js you just need to set your ts build folder as your srcDir in your elder.config.js and follow the standard Svelte Typescript setup/preprocessor. Things should work out of the box from there.