summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 18:14:56 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-02 18:14:56 -0500
commit1596e91887b42816dae412c77e17d2979e2e4cd4 (patch)
tree21373acd6915784f4c28eacee505c833f1a04d8b
parentad86bdc38b6cc17aa03f486df74e25e78d00498e (diff)
downloadhtml5ks-1596e91887b42816dae412c77e17d2979e2e4cd4.tar.xz
html5ks-1596e91887b42816dae412c77e17d2979e2e4cd4.zip
bleh
-rw-r--r--Makefile25
-rw-r--r--README.rst3
-rw-r--r--www/js/api.js6
-rw-r--r--www/js/html5ks.js2
4 files changed, 21 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 696fb2f..fd708a2 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ WEBPMUX ?= webpmux
CONVERT ?= convert
APNGASM ?= apngasm
NPM ?= npm
-UGLIFYJS ?= node_modules/.bin/uglifyjs
+UGLIFYJS := node_modules/.bin/uglifyjs
ifndef MINIMAL
ZOPFLIPNG ?= zopflipng
DEFLOPT ?= wine DeflOpt
@@ -150,35 +150,40 @@ JSDATA := www/js/play.js www/js/images.js
JS := $(JSLIBS) $(MYJS) $(JSDATA)
JSOUT := www/js/all.min.js
-Modernizr/dist/modernizr-build.js: Modernizr
- ln -fs ../../config-all.json Modernizr/lib/config-all.json
- cd Modernizr && $(NPM) update && node_modules/.bin/grunt build
+Modernizr/dist/modernizr-build.js: Modernizr config-all.json
+ ln -fs ../../config-all.json "$<"/lib/config-all.json
+ cd "$<" && $(NPM) update && node_modules/.bin/grunt build
when/build/when.js: when
export PYTHON=python2; cd when && $(NPM) update && $(NPM) run browserify-debug
js: $(JSOUT)
-$(JSOUT): $(JS)
# note that packr doesn't actually work
+ifndef PACKR
+ifndef CLOSURE_COMPILER
+$(JSOUT): $(JS) $(UGLIFYJS)
+else
+$(JSOUT): $(JS)
+endif
+endif
ifdef PACKR
$(PACKR) $^ -o "$@"
else
ifdef CLOSURE_COMPILER
$(CLOSURE_COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --create_source_map "$@".map --js $(subst $(SPACE), --js ,$^) --js_output_file "$@"
else
- $(NPM) update
$(UGLIFYJS) $^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false
endif
endif
-# === MISC ===
+$(UGLIFYJS): package.json
+ $(NPM) update
-clean:
- $(RM) $(CVIDEO) $(CAUDIO) $(CIMAGE)
+# === MISC ===
jshint: $(MYJS)
- jshint $^
+ jshint --show-non-errors $^
space:
$(RM) -r $(DUMP)/font
diff --git a/README.rst b/README.rst
index 94b9c94..adaa383 100644
--- a/README.rst
+++ b/README.rst
@@ -2,7 +2,8 @@
HTML5KS
=======
-.. image:: https://travis-ci.org/Hello71/html5ks.png?branch=master :target: https://travis-ci.org/Hello71/html5ks
+.. image:: https://travis-ci.org/Hello71/html5ks.png
+ :target: https://travis-ci.org/Hello71/html5ks
This is a WIP HTML5 implementation of the game `Katawa Shoujo`_.
diff --git a/www/js/api.js b/www/js/api.js
index 46e8f54..b74c1ae 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -69,7 +69,7 @@ window.html5ks.api = {
_nextType();
},
- play: function (channel, name, ignore, fade) {
+ play: function (channel, name, _, fade) {
this.stop(channel);
var deferred = when.defer(),
audio = html5ks.elements.audio[channel];
@@ -215,7 +215,7 @@ window.html5ks.api = {
},
- window: function (action, transition) {
+ window: function (action) {
var windw = html5ks.elements.window;
switch (action) {
case true:
@@ -504,7 +504,7 @@ window.html5ks.api = {
return deferred.promise;
},
- nvl: function (action, transition) {
+ nvl: function (action) {
var nvl = html5ks.elements.nvl;
switch (action) {
case true:
diff --git a/www/js/html5ks.js b/www/js/html5ks.js
index 73cb249..916426c 100644
--- a/www/js/html5ks.js
+++ b/www/js/html5ks.js
@@ -109,7 +109,7 @@ window.html5ks = {
}
}, 1000);
this._spinners += mod;
- assert(this._spinners >= 0);
+ window.assert(this._spinners >= 0);
},
scale: function () {
var newScale = 1;