mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Lots of jshint fixes. Jshint now passes properly.
Also added guide to README about how to package a new Phaser release.
This commit is contained in:
parent
678c7af94c
commit
65828dfab3
4 changed files with 30 additions and 7 deletions
|
@ -266,6 +266,18 @@ Should you wish to build Phaser from source you can take advantage of the provid
|
|||
|
||||
Run `grunt` to perform a default build to the `dist` folder.
|
||||
|
||||
### Packaging a new release
|
||||
|
||||
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:
|
||||
|
||||
1. Make sure the version number is increased, in line with semver policies, in the following files: `package.json` and `src/Phaser.js`
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
![Made With Phaser](http://phaser.io/images/github/div-made-with.png "Made With Phaser")
|
||||
<a name="games"></a>
|
||||
|
||||
|
@ -314,6 +326,13 @@ If you code with [TypeScript](http://www.typescriptlang.org/) there are comprehe
|
|||
![Change Log](http://phaser.io/images/github/div-change-log.png "Change Log")
|
||||
<a name="change-log"></a>
|
||||
|
||||
## Version 2.7.3 - In development
|
||||
|
||||
* Replaced missing jshintrc file (#2912)
|
||||
* Added tempPoint argument / undefined block to Graphics.containsPoint
|
||||
* Fixed Text.setCharacterLimit conditional check
|
||||
* Added resolution argument to LoaderParser.jsonBitmapFont
|
||||
|
||||
## Version 2.7.2 - 6th December 2016
|
||||
|
||||
### New Features
|
||||
|
@ -432,11 +451,11 @@ The [Contributors Guide][contribute] contains full details on how to help with P
|
|||
|
||||
- Found a bug? Report it on [GitHub Issues][issues] and include a code sample.
|
||||
|
||||
- Pull Requests should only be made against the `dev` branch. *Never* against `master`.
|
||||
- Pull Requests should only be made against the `v2-community` folder version of Phaser, never `v2`.
|
||||
|
||||
- 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).
|
||||
- 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).
|
||||
|
||||
- Before contributing read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/CODE_OF_CONDUCT.md).
|
||||
- Before contributing read the [code of conduct](https://github.com/photonstorm/phaser/blob/master/v2-community/CODE_OF_CONDUCT.md).
|
||||
|
||||
Written something cool in Phaser? Please tell us about it in the [forum][forum], or email support@phaser.io
|
||||
|
||||
|
|
|
@ -1249,7 +1249,9 @@ Phaser.Graphics.prototype.getLocalBounds = function () {
|
|||
* @param point {Point} the point to test
|
||||
* @return {boolean} the result of the test
|
||||
*/
|
||||
Phaser.Graphics.prototype.containsPoint = function (point) {
|
||||
Phaser.Graphics.prototype.containsPoint = function (point, tempPoint) {
|
||||
|
||||
if (tempPoint === undefined) { tempPoint = new Phaser.Point(); }
|
||||
|
||||
this.worldTransform.applyInverse(point, tempPoint);
|
||||
|
||||
|
|
|
@ -1682,11 +1682,11 @@ Phaser.Text.prototype.getBounds = function (matrix) {
|
|||
*/
|
||||
Phaser.Text.prototype.setCharacterLimit = function (characterLimit, suffix) {
|
||||
|
||||
this.characterLimitSuffix = suffix == undefined ? '' : suffix;
|
||||
this.characterLimitSuffix = (suffix === undefined) ? '' : suffix;
|
||||
this.characterLimitSize = characterLimit;
|
||||
|
||||
this.updateText();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The text to be displayed by this Text object.
|
||||
|
|
|
@ -36,6 +36,7 @@ Phaser.LoaderParser = {
|
|||
* @param {number} [xSpacing=0] - Additional horizontal spacing between the characters.
|
||||
* @param {number} [ySpacing=0] - Additional vertical spacing between the characters.
|
||||
* @param {Phaser.Frame} [frame] - Optional Frame, if this font is embedded in a texture atlas.
|
||||
* @param {number} [resolution] - Optional game resolution to apply to the kerning data.
|
||||
* @return {object} The parsed Bitmap Font data.
|
||||
*/
|
||||
xmlBitmapFont: function (xml, baseTexture, xSpacing, ySpacing, frame, resolution) {
|
||||
|
@ -94,9 +95,10 @@ Phaser.LoaderParser = {
|
|||
* @param {number} [xSpacing=0] - Additional horizontal spacing between the characters.
|
||||
* @param {number} [ySpacing=0] - Additional vertical spacing between the characters.
|
||||
* @param {Phaser.Frame} [frame] - Optional Frame, if this font is embedded in a texture atlas.
|
||||
* @param {number} [resolution] - Optional game resolution to apply to the kerning data.
|
||||
* @return {object} The parsed Bitmap Font data.
|
||||
*/
|
||||
jsonBitmapFont: function (json, baseTexture, xSpacing, ySpacing, frame) {
|
||||
jsonBitmapFont: function (json, baseTexture, xSpacing, ySpacing, frame, resolution) {
|
||||
|
||||
var data = {
|
||||
font: json.font.info._face,
|
||||
|
|
Loading…
Reference in a new issue