From 9b47fdfd015454cd85b79d728ee20b0d3201b8e6 Mon Sep 17 00:00:00 2001 From: Oliver Wegner Date: Sat, 4 Apr 2015 15:18:49 +0200 Subject: [PATCH] introducing scriptloader & interpreter --- client/meteor-skeleton.html | 2 +- public/js/interpreter.coffee | 5 +++++ public/js/scriptloader.coffee | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 public/js/interpreter.coffee create mode 100644 public/js/scriptloader.coffee diff --git a/client/meteor-skeleton.html b/client/meteor-skeleton.html index 107f91e..a882765 100644 --- a/client/meteor-skeleton.html +++ b/client/meteor-skeleton.html @@ -6,7 +6,7 @@ Meteor Bootstrap skeleton - + diff --git a/public/js/interpreter.coffee b/public/js/interpreter.coffee new file mode 100644 index 0000000..9a5cf22 --- /dev/null +++ b/public/js/interpreter.coffee @@ -0,0 +1,5 @@ + +console.log 'interpreter run!' + +123 + diff --git a/public/js/scriptloader.coffee b/public/js/scriptloader.coffee new file mode 100644 index 0000000..3a73a99 --- /dev/null +++ b/public/js/scriptloader.coffee @@ -0,0 +1,12 @@ + +class Scriptloader + constructor: (interpreter, scripts) => + $.ajax { + url: "/js/#{interpreter}", + dataType: 'text', + success: (data) -> + console.log "success: #{data}" + error: (xhr, stuff, error) -> + console.log "ERROR loading interpreter: #{error}" + } +