From c85c3b61b67be21d42062131856cd0bf357ae267 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 10 Nov 2017 20:15:04 +0700 Subject: [PATCH] background audio, ES6 uglify, no tests --- Gulpfile.coffee | 6 ++--- html/index.html | 4 +++- html/ru.html | 7 +++--- html/test.html | 64 ------------------------------------------------- package.json | 2 +- test/main.js | 36 ---------------------------- 6 files changed, 11 insertions(+), 108 deletions(-) delete mode 100644 html/test.html delete mode 100644 test/main.js diff --git a/Gulpfile.coffee b/Gulpfile.coffee index 0e5e63c..83382ab 100644 --- a/Gulpfile.coffee +++ b/Gulpfile.coffee @@ -3,7 +3,7 @@ gulp = require('gulp') gutil = require('gulp-util') coffee = require("gulp-coffee") sass = require('gulp-sass') -uglify = require('gulp-uglify') +uglify = require('gulp-uglify-es').default zip = require('gulp-zip') concat = require('gulp-concat') rename = require('gulp-rename') @@ -19,8 +19,8 @@ html = (target, debug) -> 'html/index.html' 'html/ru.html' ] - if (debug) - sources.push('html/test.html') + #if (debug) + # sources.push('html/test.html') gulp.src(sources) .pipe(gulp.dest(target)) #gulp.src(['game/gamepad.min.js']).pipe(gulp.dest(target+"/game")) diff --git a/html/index.html b/html/index.html index 828171f..c00be81 100644 --- a/html/index.html +++ b/html/index.html @@ -31,6 +31,7 @@

+

Audio: felix blume — On a train in Ukraine, going to Chernobyl, CC-BY license

@@ -38,10 +39,11 @@ - + + - + + - - - - - - - - - - - diff --git a/package.json b/package.json index 388473c..8ddf92a 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "gulp-concat": "^2.6.1", "gulp-rename": "^1.2.2", "gulp-sass": "^3.1.0", - "gulp-uglify": "^3.0.0", + "gulp-uglify-es": "^0.1.4", "gulp-util": "^3.0.8", "gulp-zip": "^4.0.0" } diff --git a/test/main.js b/test/main.js deleted file mode 100644 index 95305ac..0000000 --- a/test/main.js +++ /dev/null @@ -1,36 +0,0 @@ -salet.autosave = false; -salet.autoload = false; - -$(document).ready(function() { - QUnit.test("The game starts okay.", function(assert) { - assert.notEqual(salet, void 0, "Salet is initialized"); - return assert.equal(salet.current, "start", "Salet is in the room called 'start'"); - }); - QUnit.test("There are no game-breaking bugs when entering rooms.", function(assert) { - for (var key in salet.rooms) { - // skip loop if the property is from prototype - if (!salet.rooms.hasOwnProperty(key)) continue; - - var room = salet.rooms[key]; - - assert.ok(salet.goTo(room.name), "Entered room "+room.name); - } - }); - QUnit.test("There are no game-breaking bugs in all actions.", function(assert) { - for (var key in salet.rooms) { - // skip loop if the property is from prototype - if (!salet.rooms.hasOwnProperty(key)) continue; - var room = salet.rooms[key]; - - salet.goTo(room.name); - for (var act in room.actions) { - if (!room.actions.hasOwnProperty(act)) continue; - assert.ok(act.fcall(room), "Executed action "+act); - } - for (var act in room.writers) { - if (!room.writers.hasOwnProperty(act)) continue; - assert.ok(act.fcall(room), "Executed action "+act); - } - } - }); -});