SaFrMo / vue3-boardgame

Vue 3 plugin for boardgame.io
5 stars 1 forks source link

index.html example and how to run #2

Closed anurat closed 2 years ago

anurat commented 2 years ago

Hello, first of all, thank you for providing vue 3 integration with boardgame.io I'd love to use this for building my game but couldn't work it out.

I tried to follow the README and created 2 files, index.js and App.vue then I'm not sure what to do next. Should I use index.html from boardgame.io tutorial? Should I use parcel to compile and run like in the boardgame.io tutorial? I saw you use Vite in the package, do I need to learn it in order to use this properly? If possible, could you provide more info in the README to get the project running, like just a no error blank page would still be helpful and hopefully I could go from there.

SaFrMo commented 2 years ago

Hi Anurat! Thanks for your interest in the library. If you haven't already, I would work through these steps:

  1. Work through the full tutorial on the boardgame.io site. (It sounds like you've already done this, just wanting to make sure!)
  2. Determine how you want to create your Vue 3 app - Vite, vanilla JS, etc. I recommend Vite (instructions) because it takes a bit less setup than most other kinds of projects, but Vite isn't required for this library to work. (More installation instructions are available here and app creation steps are available here.)
  3. However you create your Vue 3 app, whether it's Vite or another system, you can add app.use like in the README. From there, you can pass your boardgame.io options or an already-created client, whichever you prefer.

Setting up a Vue 3 project is a little outside the scope of the readme, but if this continues to be an issue I can set up a quick template that you can fork. Let me know how it goes!

anurat commented 2 years ago

Thank you so much for prompt response! Sounds like a good time for me to learn Vite. Will come back for more questions or close issue if success.

anurat commented 2 years ago

Vite is so nice to work with. Thank you for introducing me to Vite. And Vue is working too! thank you.