From 516d0ff6952bda3523f550dbd36da64e2f6b1eb1 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Mon, 8 Jun 2015 23:59:07 +0200 Subject: [PATCH] Use one-file scripting Also source maps support --- .gitignore | 2 +- Makefile | 11 +++++++++-- app.html | 3 +-- loader.js | 2 -- script.js | 3 +++ 5 files changed, 14 insertions(+), 7 deletions(-) delete mode 100755 loader.js diff --git a/.gitignore b/.gitignore index aa1f911..1e2fc1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -bundle.js +out.js node_modules diff --git a/Makefile b/Makefile index c6415e4..fe62960 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,9 @@ -bundle.js: loader.js - browserify $< -o $@ +FLAGS='' + +main: out.js + +debug: FLAGS += --debug +debug: out.js + +out.js: script.js + browserify $< -o $@ $(FLAGS) diff --git a/app.html b/app.html index 8f306e1..20b0046 100644 --- a/app.html +++ b/app.html @@ -7,8 +7,7 @@ - - + diff --git a/loader.js b/loader.js deleted file mode 100755 index 5988fd1..0000000 --- a/loader.js +++ /dev/null @@ -1,2 +0,0 @@ -window.Client = require('agario-client'); -window.EventEmitter = require('events').EventEmitter; diff --git a/script.js b/script.js index 60fb962..c4a5b15 100644 --- a/script.js +++ b/script.js @@ -1,3 +1,6 @@ +window.Client = require('agario-client'); +window.EventEmitter = require('events').EventEmitter; + function AnimatedValue(value) { this.write(value); }