rblopes / generator-phaser-plus

[🛑 DISCONTINUED] It has been a long journey but development of `generator-phaser-plus` is now over. I recommend you have a look and fork `yandeu/phaser-project-template` instead.
https://github.com/yandeu/phaser-project-template
MIT License
146 stars 14 forks source link

Any documentation #7

Closed budda closed 7 years ago

budda commented 8 years ago

For Phaser fiddlers who are just dipping their toe in the environment could be nice but some documentation on getting started would be useful.

Covering such basic things as:

Hopefully this info wont care about slush vs Yeoman issue either. Enable the Github Wiki for the project to get started?

rblopes commented 8 years ago

Agreed. The project is still very lacking of documentation. It doesn't necessarily have much to do with the generator either, but, in fact, the template project is the right place to begin introducing some of the topics you mentioned and several others.

In late August I began writing the first drafts about project structure, the choice on assets packs and such, but I got lost on track and other things got on the way. I'm also holding a next version release, as I thought on releasing the first docs along with it. I'm reconsidering that.

I'm not comfortable about issuing the docs through a GitHub Wiki, though. They are a bit clumsy and its changes aren't tracked by the repository. I'll begin publishing some Markdown texts in the template repository. Also, I'll explore some other means of presenting documentation as well, like a GitHub page.

In short, I have plans on doing some kind of "project handbook", but still there are things I'd like to research yet, and these may take a little while. I'll see if I can finish and publish some samples by the next few days.

budda commented 8 years ago

If github Wiki isn't right - maybe something like https://www.gitbook.com/ would be better ?

Agree on the right place is the other repo - my bad - forgot about it being two repos.

rblopes commented 8 years ago

GitBook looks good, maybe a viable option too.

JarLowrey commented 8 years ago

Question in the same vein, how do you use browser-sync with this project? When I attempt to run browser-sync --version from my game directory, I get a command not found. Might it be related to the failed GET below?

selection_035

rblopes commented 8 years ago

To solve the missing BrowserSync script, try doing a "Hard Reload" (Control+Shift+R or right click the reload button when Dev Tools is open.) That happens from time to time.

As for BrowserSync itself, it's a regular devDependency of projects, not available globally. You may find the executable hidden inside node_modules/.bin though. Using npm scripts may help too.

JarLowrey commented 8 years ago

Wow. Amazing, thank you. How do you recommend using Browser sync to test the project? I see it is included in the gulpfile.js, but I'm not sure what it is doing. Shouldn't multiple windows be appearing when running gulp then? Could we add an NPM script to make it easier for noobs to find browser-sync?

rblopes commented 8 years ago

It depends on what you're trying to do. In "dev mode", Browsersync starts serving the game page at localhost:3000. If for some reason it doesn't show up in the browser, you can still enter and find the game at that address.

If you want to serve the dist/ directory, to test a final build for example, using the Browsersync CLI will require a specific configuration module (CLI flags work too, however a module is preferable, IMO). I might add a script to serve the dist/ dir but I must figure out how to add it without overcomplicating the project config first. Simplest way is just running ./node_modules/.bin/browser-sync start --server dist. npm scripts may omit the "./node_modules/.bin/" path.

As always, you can find out more about Browsersync at their site.

JarLowrey commented 8 years ago

Thank you. I've been using that functionality extensively: big help. I read the BrowserSync summary a bit and it made me think that it was supposed to open up multiple windows for testing, that's what I was trying to ask about.

rblopes commented 7 years ago

Landed! Still lots to do but it's a start, at least. Didn't mean to take so long to deliver this, sorry. Will be exploring GitHub Pages after publishing the package to npm.

JarLowrey commented 7 years ago

Wow this is awesome! Thank you! I'm working on a blog post explaining how I used the generator right now, so this manual comes at a perfect time. I'll be able to read more about it and get caught up. Thanks @rblopes !