From 46eb525c70bd088613db9fd70e5f56281141ca92 Mon Sep 17 00:00:00 2001 From: Oliver Wegner Date: Sat, 11 Apr 2015 13:39:21 +0200 Subject: [PATCH] moved scriptloader from public folder to client folder, to load it implicitly --- client/meteor-skeleton.html | 2 +- client/meteor-skeleton.js | 21 +++++++++++++++++++++ {public/js => client}/scriptloader.coffee | 0 public/js/recorder.coffee | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 client/meteor-skeleton.js rename {public/js => client}/scriptloader.coffee (100%) create mode 100644 public/js/recorder.coffee diff --git a/client/meteor-skeleton.html b/client/meteor-skeleton.html index a882765..98707b5 100644 --- a/client/meteor-skeleton.html +++ b/client/meteor-skeleton.html @@ -6,7 +6,7 @@ Meteor Bootstrap skeleton - + diff --git a/client/meteor-skeleton.js b/client/meteor-skeleton.js new file mode 100644 index 0000000..758e661 --- /dev/null +++ b/client/meteor-skeleton.js @@ -0,0 +1,21 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + if (Meteor.isClient) { + Session.setDefault('counter', 0); + Template.hello.helpers({ + counter: function() { + return Session.get('counter'); + } + }); + Template.hello.events({ + 'click button': function() { + return Session.set('counter', Session.get('counter') + 1); + } + }); + } + + if (Meteor.isServer) { + Meteor.startup(function() {}); + } + +}).call(this); diff --git a/public/js/scriptloader.coffee b/client/scriptloader.coffee similarity index 100% rename from public/js/scriptloader.coffee rename to client/scriptloader.coffee diff --git a/public/js/recorder.coffee b/public/js/recorder.coffee new file mode 100644 index 0000000..9888871 --- /dev/null +++ b/public/js/recorder.coffee @@ -0,0 +1,3 @@ + +console.log 'recorder' +