Skip to content

Commit 65828df

Browse files
committed
Lots of jshint fixes. Jshint now passes properly.
Also added guide to README about how to package a new Phaser release.
1 parent 678c7af commit 65828df

4 files changed

Lines changed: 30 additions & 7 deletions

File tree

v2-community/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,18 @@ Should you wish to build Phaser from source you can take advantage of the provid
266266

267267
Run `grunt` to perform a default build to the `dist` folder.
268268

269+
### Packaging a new release
270+
271+
Releases of new versions of Phaser CE are under the communities control. If you feel there are sufficient fixes, or important ones that warrant a new version release, then please do the following:
272+
273+
1. Make sure the version number is increased, in line with semver policies, in the following files: `package.json` and `src/Phaser.js`
274+
275+
2. Make sure that you have added details of the new version to the `README.md` and `CHANGELOG.md`. This should include a summary of changes made in the version. You can usually obtain this from the commit / PR history. It's nice to credit who made the changes by linking to their GitHub user ID, but isn't a requirement.
276+
277+
3. From the root of the `v2-community` folder, run `grunt jshint` and make sure there are no jshint errors. If there are, please fix them, or request that the original author of the code does so.
278+
279+
4. Once jshint passes run `grunt release`, sit back, and wait. It will build all of the versions of Phaser required, update the doc files, TypeScript defs and lots more. When finished, commit all of the new files and make sure to include a clear message in your commit saying you want this release pushed to npm. Be sure to tag me when doing this, i.e. 'Phaser CE Version 2.X.X. Please publish to npm @photonstorm' - I'll see it, and then publish as soon as I can (often the same day).
280+
269281
![Made With Phaser](http://phaser.io/images/github/div-made-with.png "Made With Phaser")
270282
<a name="games"></a>
271283

@@ -314,6 +326,13 @@ If you code with [TypeScript](http://www.typescriptlang.org/) there are comprehe
314326
![Change Log](http://phaser.io/images/github/div-change-log.png "Change Log")
315327
<a name="change-log"></a>
316328

329+
## Version 2.7.3 - In development
330+
331+
* Replaced missing jshintrc file (#2912)
332+
* Added tempPoint argument / undefined block to Graphics.containsPoint
333+
* Fixed Text.setCharacterLimit conditional check
334+
* Added resolution argument to LoaderParser.jsonBitmapFont
335+
317336
## Version 2.7.2 - 6th December 2016
318337

319338
### New Features
@@ -432,11 +451,11 @@ The [Contributors Guide][contribute] contains full details on how to help with P
432451

433452
- Found a bug? Report it on [GitHub Issues][issues] and include a code sample.
434453

435-
- Pull Requests should only be made against the `dev` branch. *Never* against `master`.
454+
- Pull Requests should only be made against the `v2-community` folder version of Phaser, never `v2`.
436455

437-
- Before submitting a Pull Request run your code through [JSHint](http://www.jshint.com/) using our [config](https://github.com/photonstorm/phaser/blob/master/.jshintrc).
456+
- Before submitting a Pull Request run your code through [JSHint](http://www.jshint.com/) using our [config](https://github.com/photonstorm/phaser/blob/master/v2-community/.jshintrc).
438457

439-
- Before contributing read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/CODE_OF_CONDUCT.md).
458+
- Before contributing read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/v2-community/CODE_OF_CONDUCT.md).
440459

441460
Written something cool in Phaser? Please tell us about it in the [forum][forum], or email support@phaser.io
442461

v2-community/src/gameobjects/Graphics.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,9 @@ Phaser.Graphics.prototype.getLocalBounds = function () {
12491249
* @param point {Point} the point to test
12501250
* @return {boolean} the result of the test
12511251
*/
1252-
Phaser.Graphics.prototype.containsPoint = function (point) {
1252+
Phaser.Graphics.prototype.containsPoint = function (point, tempPoint) {
1253+
1254+
if (tempPoint === undefined) { tempPoint = new Phaser.Point(); }
12531255

12541256
this.worldTransform.applyInverse(point, tempPoint);
12551257

v2-community/src/gameobjects/Text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,11 +1682,11 @@ Phaser.Text.prototype.getBounds = function (matrix) {
16821682
*/
16831683
Phaser.Text.prototype.setCharacterLimit = function (characterLimit, suffix) {
16841684

1685-
this.characterLimitSuffix = suffix == undefined ? '' : suffix;
1685+
this.characterLimitSuffix = (suffix === undefined) ? '' : suffix;
16861686
this.characterLimitSize = characterLimit;
16871687

16881688
this.updateText();
1689-
}
1689+
};
16901690

16911691
/**
16921692
* The text to be displayed by this Text object.

v2-community/src/loader/LoaderParser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Phaser.LoaderParser = {
3636
* @param {number} [xSpacing=0] - Additional horizontal spacing between the characters.
3737
* @param {number} [ySpacing=0] - Additional vertical spacing between the characters.
3838
* @param {Phaser.Frame} [frame] - Optional Frame, if this font is embedded in a texture atlas.
39+
* @param {number} [resolution] - Optional game resolution to apply to the kerning data.
3940
* @return {object} The parsed Bitmap Font data.
4041
*/
4142
xmlBitmapFont: function (xml, baseTexture, xSpacing, ySpacing, frame, resolution) {
@@ -94,9 +95,10 @@ Phaser.LoaderParser = {
9495
* @param {number} [xSpacing=0] - Additional horizontal spacing between the characters.
9596
* @param {number} [ySpacing=0] - Additional vertical spacing between the characters.
9697
* @param {Phaser.Frame} [frame] - Optional Frame, if this font is embedded in a texture atlas.
98+
* @param {number} [resolution] - Optional game resolution to apply to the kerning data.
9799
* @return {object} The parsed Bitmap Font data.
98100
*/
99-
jsonBitmapFont: function (json, baseTexture, xSpacing, ySpacing, frame) {
101+
jsonBitmapFont: function (json, baseTexture, xSpacing, ySpacing, frame, resolution) {
100102

101103
var data = {
102104
font: json.font.info._face,

0 commit comments

Comments
 (0)