Hey there! I know we went over this on the discord server, but I'm writing this to record the answer for other people 🙂
Importing the Monogatari module into your js is simple:
import Monogatari from '@monogatari/core'
Just with that, you should be able to use all the normal monogatari functions, with the very minor difference of using a capital
M instead of a lowercase
You will also need to import the base CSS into your project, depending on what tools you're using, the import statement will look something like:
Then, you need to add the HTML structure to your project, you can just copy the contents from the
index.html file. The elements you need to add are the
visual-novel element and everything inside it:
Monogatari uses "native" web components so you can add it on pretty much any other framework (react, vue, angular, etc.) and it will work.
Finally, make sure that you call the
Monogatari.init() function (the one normally present in the
main.js file) as this is the function that actually loads up everything, so you can call it only when you're going to show your game.