hello, i met the question same as you . Sorry, i am not good at english.
For example, your write your game code in function " gamefucntion(){}" .
You can write
game.state.add('yourgame', gamefucntion);
game.state.start('yourgame');in CustomContent.js.
But, i don't know how i can exit my game completely.
I want to combine renjs with my phaser game, which is really drives me crazy.