You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+19-16
Original file line number
Diff line number
Diff line change
@@ -18,54 +18,57 @@ Before contributing, please read the [code of conduct](https://github.com/photon
18
18
19
19
**5. Share as much information as possible.** Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed.
20
20
21
+
## Support Forum
21
22
22
-
## Pixi and Phaser
23
+
We have a very active [Phaser Support Forum][4]. If you need general support, or are struggling to understand how to do something or need your code checked over, then we would urge you to post it to our forum. There are a lot of friendly devs in there who can help, as well as the core Phaser team, so it's a great place to get support. You're welcome to report bugs directly on GitHub, but for general support we'd always recommend using the forum first.
23
24
24
-
Phaser doesn't use Pixi anymore.
25
+
## Making Changes
25
26
27
+
I'm assuming you already have a recent version of [Node](https://nodejs.org) installed locally and can run `npm`. This guide is tested and works on both Windows 10 and OS X.
26
28
27
-
##Support Forum
29
+
### 1. Checkout the repos
28
30
29
-
We have a very active [Phaser Support Forum][4]. If you need general support, or are struggling to understand how to do something or need your code checked over, then we would urge you to post it to our forum. There are a lot of friendly devs in there who can help, as well as the core Phaser and Pixi teams, so it's a great place to get support from. You're welcome to report bugs directly on GitHub, but for general support we'd always recommend using the forum first.
31
+
Check-out both the [Phaser repo](https://github.com/photonstorm/phaser) and the [Phaser 3 Examples Repo](https://github.com/photonstorm/phaser3-examples). Make sure the Phaser 3 Examples repo is saved locally in a folder called `phaser3-examples`, which will be the default for most Git clients.
30
32
33
+
### 2. Matching Directory Levels
31
34
32
-
## Making Changes
35
+
Ensure that both repos live at the same depth in your directory structure. For example: `/usr/home/web/phaser` and `/usr/home/web/phaser3-examples`. This is so the dev build scripts in the Phaser repo can safely copy files to `../phaser3-examples` and have them end up in the correct place.
33
36
34
-
To take advantage of our grunt build script and jshint config it will be easiest for you if you have node.js and grunt installed locally.
37
+
### 3. Install dependencies
35
38
36
-
You can download node.js from [nodejs.org][3]. After it has been installed open a console and run `npm i -g grunt-cli`to install the global`grunt` executable.
39
+
Using your console, run `npm install` or `yarn install` as we've configs for both. This process will install a local copy of webpack and a handful of small support scripts. Note that Yarn on Windows seems to have issues making some packages global, so stick with npm if this is the case.
37
40
38
-
After that you can clone the repository and run `npm i` inside the cloned folder. This will install dependencies necessary for building the project. Once that is ready,
39
-
make your changes and submit a Pull Request:
41
+
### 4. Webpack
40
42
41
-
-**Send Pull Requests to the `master` branch.** We _used_ to insist PRs went to `dev` but have removed this policy since the release of Phaser CE.
43
+
Making sure you've got both repos checked out, and at the same directory level in your filesystem, issue the command `webpack`. If you can't issue the command then webpack may need [installing globally](https://webpack.js.org/guides/installation/). Webpack will build Phaser and if there are any path errors in the code they'll be flagged during the build process.
42
44
43
-
-**Ensure changes are jshint validated.** Our JSHint configuration file is provided in the repository and you should check against it before submitting.
45
+
What you need is the ability to issue the command `webpack` within the v3 folder and have it work.
44
46
45
-
-**Never commit new builds.** When making a code change you should always run `grunt` which will rebuild the project so you can test, *however* please do not commit these new builds or your PR will be closed. Builds by default are placed in the `dist` folder, to keep them separate from the `build` folder releases.
47
+
### 5. ESLint
46
48
47
-
-**Only commit relevant changes.** Don't include changes that are not directly relevant to the fix you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files changing only whitespace or trash files will likely get your PR closed.
49
+
There is an ESLint configuration and an Editor Configuration in the v3 folder. **Please adhere to them!** Although not enforced in the build process yet, I will be adding that at a later point. There are lots of tools you can install so your editor of choice will check the ESLint config during development.
48
50
51
+
To test if your code passes our lint config issue the command `npm run lint`.
49
52
50
53
## Coding style preferences are not contributions
51
54
52
55
If your PR is doing little more than changing the Phaser source code into a format / coding style that you prefer then we will automatically close it. All PRs must adhere to the coding style already set-out across the thousands of lines of code in Phaser. Your personal preferences for how things should "look" or be structured do not apply here, sorry. PRs should fix bugs, fix documentation or add features. No changes for the sake of change.
53
56
54
-
55
57
## I don't really like git / node.js, but I can fix this bug
56
58
57
59
That is fine too. While Pull Requests are the best thing in the world for us, they are not the only way to help. You're welcome to post fixes to our forum or even just email them to us. All we ask is that you still adhere to the guidelines presented here re: JSHint, etc.
58
60
59
-
60
61
## Code Style Guide
61
62
63
+
We provide an .editorconfig and eslint config for you to use, but generally:
64
+
62
65
- Use 4 spaces for tabs, never tab characters.
63
66
64
67
- No trailing whitespace, blank lines should have no whitespace.
65
68
66
69
- Always favor strict equals `===` unless you *need* to use type coercion.
67
70
68
-
- Follow conventions already in the code, and listen to jshint. Our config is set-up for a reason.
71
+
- Follow conventions already in the code, and listen to eslint. Our config is set-up for a reason.
69
72
70
73
Thanks to Chad for creating the original Pixi.js Contributing file which we adapted for Phaser.
This repo is for Phaser 3 related issues only. If you've found an issue with Phaser 2 please see the [Phaser CE (Community Edition)](https://github.com/photonstorm/phaser-ce) repo instead.
2
2
3
-
Official support for Phaser 2 has now ended. We urge you to visit the [Phaser CE (Community Edition)](https://github.com/photonstorm/phaser-ce) for continued development of v2.
4
-
5
-
This Issue is about (delete as applicable)
6
-
7
-
* A bug in the API (always say which version you're using!)
8
-
* An error in the documentation
9
-
* An error in the TypeScript defs
10
-
* An error on the web site
11
-
* A problem with my own code
3
+
This should not be used for technical support. If you're struggling trying to use Phaser then post your question to the [forum](http://www.html5gamedevs.com/forum/33-phaser-3/), [Slack](https://phaser.io/community/slack) or [Discord](https://phaser.io/community/discord) channels. GitHub Issues are for bugs and feature requests only.
12
4
13
5
API errors must include example code showing what happens, and why you don't believe this is the expected behavior. Issues posted without code take _far_ longer to get resolved, _if ever_. Feel free to use a site such as jsBin or [CodePen](https://codepen.io/pen?template=YeEWom) to demo the problem. If we can run it, and see the error, we can usually fix it.
14
6
15
-
If your Issue contains _any_ form of hostility it will be instantly closed.
7
+
If your Issue contains _any_ form of hostility it will be instantly closed and you will be blocked from access to all our repos.
0 commit comments