Skip to content

Commit 300e177

Browse files
committed
Dropped bower in favour of npm for SAT.js (#46).
Added banner to minified distributive as part of the gulp task. Prepped for 0.2.1 release.
1 parent 875318a commit 300e177

File tree

7 files changed

+34
-38
lines changed

7 files changed

+34
-38
lines changed

.bowerrc

-3
This file was deleted.

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules/
2-
vendor/
32
.project
43
npm-debug.log*

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Arcade Slopes Change Log
22

3+
## v0.2.1 - 1st August 2017
4+
- Dropped bower in favour of npm to load in the SAT.js dependency.
5+
- Added a banner to the minified distributive as part of the build process.
6+
37
## v0.2.0 - 18th June 2017
48
- Added heuristics for square tiles to improve skipped collisions (#38) at the
59
expense of some inconsistencies when bodies exit tiles from inside.

bower.json

-22
This file was deleted.

gulpfile.js

+23-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
1-
var gulp = require('gulp'),
2-
util = require('gulp-util'),
3-
concat = require('gulp-concat'),
4-
rename = require('gulp-rename'),
5-
uglify = require('gulp-uglify');
1+
var gulp = require('gulp'),
2+
util = require('gulp-util'),
3+
banner = require('gulp-banner'),
4+
concat = require('gulp-concat'),
5+
rename = require('gulp-rename'),
6+
uglify = require('gulp-uglify');
7+
pack = require('./package.json');
8+
9+
var comment = ['/**',
10+
' * Phaser Arcade Slopes v<%= package.version %>',
11+
' *',
12+
' * <%= package.description %>',
13+
' *',
14+
' * <%= package.homepage %>',
15+
' * Copyright 2016-2017 <%= package.author %>',
16+
' * Released under the <%= package.license %> license',
17+
' */',
18+
''
19+
].join('\n');
620

7-
// Build by default
821
gulp.task('default', ['build']);
922

10-
// The build task
1123
gulp.task('build', function () {
12-
gulp.src(['src/**/*.js', 'vendor/sat-js/SAT.js'])
24+
return gulp.src(['src/**/*.js', 'node_modules/sat/SAT.js'])
1325
.pipe(concat('phaser-arcade-slopes.js'))
1426
.pipe(gulp.dest('dist'))
1527
.pipe(rename({suffix: '.min'}))
1628
.pipe(uglify())
29+
.pipe(banner(comment, {
30+
package: pack
31+
}))
1732
.pipe(gulp.dest('dist'));
1833
});
1934

20-
// The watch task
2135
gulp.task('watch', function () {
2236
gulp.watch('src/**/*.js', ['build']);
2337
});

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phaser-arcade-slopes",
3-
"version": "0.2.0",
4-
"description": "A Phaser plugin that brings sloped tile collision handling to Phaser's Arcade Physics engine.",
3+
"version": "0.2.1",
4+
"description": "A Phaser plugin that brings sloped tile collision handling to Phaser's Arcade Physics engine",
55
"main": "dist/phaser-arcade-slopes.js",
66
"scripts": {},
77
"repository": {
@@ -26,8 +26,12 @@
2626
"author": "Chris Andrew <[email protected]>",
2727
"license": "MIT",
2828
"homepage": "https://github.com/hexus/phaser-arcade-slopes",
29+
"dependencies": {
30+
"sat": "0.6.0"
31+
},
2932
"devDependencies": {
3033
"gulp": "^3.9.1",
34+
"gulp-banner": "^0.1.3",
3135
"gulp-concat": "^2.6.0",
3236
"gulp-rename": "^1.2.2",
3337
"gulp-uglify": "^1.5.3",

src/ArcadeSlopes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Phaser.Plugin.ArcadeSlopes.prototype.constructor = Phaser.Plugin.ArcadeSlopes;
5454
* @constant
5555
* @type {string}
5656
*/
57-
Phaser.Plugin.ArcadeSlopes.VERSION = '0.2.0';
57+
Phaser.Plugin.ArcadeSlopes.VERSION = '0.2.1';
5858

5959
/**
6060
* The Separating Axis Theorem collision solver type.

0 commit comments

Comments
 (0)