Which files to upload when publishing online

Hi

I’ve nearly finished my game and I wanted to know which files you upload to publish a game online?
Inside my project folder I have several different files plus 5 folders, .cache, dist, node_modules, public, and src. Do you upload the whole lot or just some of them?

Thanks
Steve

Hi,
Did you use a bundler ? like webpack, parcel or rollup?
If yes, you can buid the project, and just need to upload the content of the dist folder

In case anyone is wondering, thanks to @BlunT76 I figured out how to actually get it running. I publish my files to Github pages. Here’s my structure of my files:

root–>v0.3 (helps me to see how I progressed on my game)
|
→ node_modules
→ src
| → assets (tilemaps, spritesheets, sounds, etc)
| → player (for player related logic)
| → plugins (put min.js files of the plugins I used here)
| → scenes (code for different scenes here)
→ webpack
→ index.html

Since I’m using the Phaser 3 + ES6 + Webpack bundle template, I can locally run in my v0.3 folder index.html through npm build and npm start.

Once I’m satisfied with my changes, I push to github, then do npm run build to create a dist subfolder under v0.3 folder. I also copy the necessary files from src to dist so that it it preloads everything (all the assets really) nicely. I can then basically go to index.html online on my github page and then view the game I created.

I’ve used the template as well and have a dist folder. Inside the folder are a main.js.map file as well as index.html and a folder called assets which contains all the assets used in the game. Is it just a matter of uploading the dist folder or do I need to upload the source files also which are in public and src folders?

Just the content of the dist files, it happens that files are missing, so you needs to copy them manually to the dist folder