scala-js / scala-js-website

Source for https://www.scala-js.org/
259 stars 146 forks source link

Tutorials for getting started with Scala.js, Vite, Laminar and ST #590

Closed sjrd closed 1 year ago

sjrd commented 1 year ago

These tutorials are the written equivalent of recent talks I made at ScalaCon and Scala.IO, as well as videos I recorded at the Scala Center: https://www.youtube.com/watch?v=dv7fPmgFTNA and https://www.youtube.com/watch?v=UePrOa_1Am8

There are probably things we can significantly improve for the website. Some open questions:

Comments welcome!

raquo commented 1 year ago

Since the tutorials page is so small, maybe move its contents to the parent https://www.scala-js.org/doc/ ?

As a reference, for Laminar itself, I think our combined learning resources page https://laminar.dev/resources works reasonably well... or at least, nobody has so far spoken up to suggest doing it differently :)

oyvindberg commented 1 year ago

Sorry, I'm late to the party here. Thanks for adding this, these are incredibly useful pointers for beginners!

I agree with @julienrf that mixing ST and Laminar in the same tutorial probably should probably be avoided - I think it's fairly unlikely that a beginner interested in one of them is also interested in the other at the same time.

How about we make the Laminar tutorial something more todo-listy, and then extract the chart.js / ST pieces into its own tutorial? I can contribute some hours towards extracting the ST parts into it's own page.

sjrd commented 1 year ago

I have finally found enough time to decompose the tutorial. There is now a Laminar-only tutorial, and then a separate one for ScalablyTyped. The Laminar tutorial is entirely available on Scribble for people to see the end result and play with it.

sjrd commented 1 year ago

OK, I have finally updated everything to use the published vite-plugin-scalajs. I have also addressed other comments, such as adding a testing section in the Laminar tutorial (I did not do it in the Vite setup to keep it to the minimum).

This is ready for a new round of review.

sjrd commented 1 year ago

Upgraded to Laminar 15.0.1, which was released today.

@gzm0 When you get the chance, could you check that your main concerns were addressed (test setup and vite-plugin setup)? If they are, I think we could merge this as improvement over the status quo, even if perhaps further refinements could come later?

sjrd commented 1 year ago

Thanks for the review :D Let's ship it 🚀