I want to integrate npm build system (Something like webpack or gulp) to a play canvas game.
This is what i want to do, build the game in playcanvas editor and then download the code using either export / download build or any similar option and place it to npm template, in which i want to be able to do npm start to serve the bundled project locally (single js file including all json and js files) and npm run build create compressed single bundle.js file (which includes all json and js files excluding assets).Is there any such tools or templates? please give some idea regarding this.
If you would like to export a Playcanvas build and add/integrate it to your offline project, you will have to also rebuild part of the Playcanvas loader. That is responsible of loading the scene/assets/scripts in place.
Personally, usually I go the other way around. I code locally on my IDE (using webpack/npm/typescript) and have the bundled script automatically uploaded to my Playcanvas editor.
There are some unofficial projects that can help you do that:
As you mentioned i see these projects are other way around ie coding in local and pushing to playcanvas editor (correct me if i am wrong). I will continue to explore more on this, and look into playcanvas loader module In the same time I would appreciate any more suggestions from anyone.