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

What would it take to make the tour a library. #66

Open
CrowdHailer opened this issue Mar 23, 2024 · 3 comments
Open

What would it take to make the tour a library. #66

CrowdHailer opened this issue Mar 23, 2024 · 3 comments

Comments

@CrowdHailer
Copy link
Contributor

I would like to be able to write tours for other things, explained in Gleam.
For example things I would personally like to write are.

  • An OTP tour
  • Implementing typechecking in Gleam
  • Implementing an interpreter in Gleam

It would be great if there was a way to something like the following

// my_tour.gleam
import gleam/tour

pub fn main() {
  tour.build("/build", pages())
}

fn pages() {
  [
    tour.Page(
      title: "Getting started with OTP",
      content: "First we need to introduce processes"
      code: "
        import gleam/otp

        // ..."
    )
  ]
}

I'm happy to help contribute to such a thing. But I think it needs a bit of design work to work out what the interface is and what should be exposed.

@lpil
Copy link
Member

lpil commented Mar 26, 2024

The tour hasn't really been designed to be used a library so it would be tricky, and OTP wouldn't be possible as it runs on JavaScript rather than Erlang.

@CrowdHailer
Copy link
Contributor Author

Good point on OTP.

I understand that it was not designed this way. However if I found a way to make it more library friendly, would that be an interesting contribution. Or should I just be copy/pasting the code to my projects

@lpil
Copy link
Member

lpil commented Mar 27, 2024

Forking is probably the best for now as I'm not sure how we could make it into a library.

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

No branches or pull requests

2 participants