samme Posted March 8, 2018 Share Posted March 8, 2018 2 hours ago, fitness23 said: If I could add it might be nice if you can add a progress bar in that one for loading there don't seem to be many resources telling you how to do it at the moment. https://github.com/samme/brunch-phaser/blob/master/app/scenes/boot.js#L36 Link to comment Share on other sites More sharing options...
nerdenough Posted March 8, 2018 Share Posted March 8, 2018 Just stumbled upon this thread. I've been working on a Phaser 3 + Babel + Webpack boilerplate for Phaser CLI (still a bit outdated and buggy, but works), but keen to help out on something more centralised and adaptable that can be more than just a simple scaffolding tool. Ppozniak 1 Link to comment Share on other sites More sharing options...
Ppozniak Posted March 8, 2018 Author Share Posted March 8, 2018 So guys, I've been studying create-react-app for a while: https://github.com/facebook/create-react-app/blob/next/packages/create-react-app/createReactApp.js Quote // The only job of create-react-app is to init the repository and then // forward all the commands to the local version of create-react-app. And I think it would be good for create-phaser-app to work in the same way. As someone mentioned earlier that's how I could see it: create-phaser-app will not be updated, because it is installed globally, so it will only create new directory and init in it, then install stuff based on user's settings (what lanaguage, and what examples). Every template could've been lying as separate repository which will be normally updated and curated, also I think we could maybe use branches to create different examples for each templates? We could decide what examples should/could be available and then create branches for each repository. Master branches would be the smallest example possible. Or - one single repo and each branch as a langauge (plain js, ts, coffee?) - if so, I'm not sure about different examples. As create-react-app is MIT, and the CLI seems to be a little complicated maybe we could use it as a base? Let me know what do you guys think about it. Link to comment Share on other sites More sharing options...
nerdenough Posted March 9, 2018 Share Posted March 9, 2018 Quote Every template could've been lying as separate repository which will be normally updated and curated, also I think we could maybe use branches to create different examples for each templates? We could decide what examples should/could be available and then create branches for each repository. Master branches would be the smallest example possible. Or - one single repo and each branch as a langauge (plain js, ts, coffee?) - if so, I'm not sure about different examples. What about different "packages" (or even a single "package" with multiple templates) similar to how create-react-app divides out its cli tool, scripts, dev utils, etc? I feel like we could easily lose track of separate repositories and branches and end up with a bunch of unmaintained templates. At the moment I'm looking at using create-react-app to upgrade phaser-cli, it definitely seems like a good base for this sort of thing from what I've seen so far. Link to comment Share on other sites More sharing options...
nerdenough Posted March 12, 2018 Share Posted March 12, 2018 I've been playing around with CRA and the beta vue-cli over the weekend and it seems to be easy enough to follow. At the moment I'm just remaking https://github.com/phaser-cli/phaser-cli to follow what CRA does, and it's working quite well so far: build/start scripts work although they're a bit rudimentary at the moment. Hopefully gonna have eject over the next couple of days, and also some workflow for CI/CD through travis because manual releases are pretty tedious. Feel free to use any of it for create-phaser-app as well. Any contributions to the code/suggestions/discussions appreciated too ?. Link to comment Share on other sites More sharing options...
Ppozniak Posted March 12, 2018 Author Share Posted March 12, 2018 1 hour ago, nerdenough said: I've been playing around with CRA and the beta vue-cli over the weekend and it seems to be easy enough to follow. At the moment I'm just remaking https://github.com/phaser-cli/phaser-cli to follow what CRA does, and it's working quite well so far: build/start scripts work although they're a bit rudimentary at the moment. Hopefully gonna have eject over the next couple of days, and also some workflow for CI/CD through travis because manual releases are pretty tedious. Feel free to use any of it for create-phaser-app as well. Any contributions to the code/suggestions/discussions appreciated too ?. Great, I went through this and it will help for sure. Thanks. Is fs.moveSync(path.join(appPath, 'gitignore'), path.join(appPath, '.gitignore')) used because `fs.copySync` ignores files starting with dot? Link to comment Share on other sites More sharing options...
nerdenough Posted March 12, 2018 Share Posted March 12, 2018 The issue in CRA was that the .gitignore was being renamed to .npmignore https://github.com/facebook/create-react-app/blob/next/packages/react-scripts/scripts/init.js#L129-L136 - I haven't tested it with the original file named ".gitignore" though. Link to comment Share on other sites More sharing options...
the-simian Posted November 23, 2018 Share Posted November 23, 2018 Just stumbled across this thread. I've been independently working on a create-phaser-app implementation for about 7-8 months or so here: https://github.com/simiancraft/create-phaser-app I think my goals are a bit different than other scaffolds here. I'm not looking for something minimal, and I am intentionally leaning on using Tiled as a level editor with this as well. Nonetheless, I wanted to post here so anyone who wanted to could see my progress. I also gave a small talk about it in Oklahoma City earlier this month as well. Here are the slides from that talk: https://slides.com/jesseharlin/set-phasers-to-javascript I also talked about it some for al lightning talk many months ago here: this is all on an outdated version of Phaser 3 at this point, but this might still be a useful resource to people reading the forum. SovietSenpai23 1 Link to comment Share on other sites More sharing options...
Recommended Posts