From bfe426a83bfcd32bac22bc06cccb15f15a9f9450 Mon Sep 17 00:00:00 2001 From: ARC Date: Mon, 4 May 2015 04:32:51 -0400 Subject: Events Graphs now supports time based filters (using the excellent moment library) --- www/lib/moment/meteor/README.md | 25 +++++++++++++++++++++++++ www/lib/moment/meteor/export.js | 3 +++ www/lib/moment/meteor/test.js | 5 +++++ 3 files changed, 33 insertions(+) create mode 100644 www/lib/moment/meteor/README.md create mode 100644 www/lib/moment/meteor/export.js create mode 100644 www/lib/moment/meteor/test.js (limited to 'www/lib/moment/meteor') diff --git a/www/lib/moment/meteor/README.md b/www/lib/moment/meteor/README.md new file mode 100644 index 00000000..9bcb50bf --- /dev/null +++ b/www/lib/moment/meteor/README.md @@ -0,0 +1,25 @@ +Packaging [Moment](momentjs.org) for [Meteor.js](http://meteor.com). + + +# Meteor + +If you're new to Meteor, here's what the excitement is all about - +[watch the first two minutes](https://www.youtube.com/watch?v=fsi0aJ9yr2o); you'll be hooked by 1:28. + +That screencast is from 2012. In the meantime, Meteor has become a mature JavaScript-everywhere web +development framework. Read more at [Why Meteor](http://www.meteorpedia.com/read/Why_Meteor). + + +# Issues + +If you encounter an issue while using this package, please CC @dandv when you file it in this repo. + + +# DONE + +* Simple test. Should be enough. + + +# TODO + +* Add other tests; however, that is overkill, and the responsibiity of Moment, not of the Meteor integration. diff --git a/www/lib/moment/meteor/export.js b/www/lib/moment/meteor/export.js new file mode 100644 index 00000000..e8870ceb --- /dev/null +++ b/www/lib/moment/meteor/export.js @@ -0,0 +1,3 @@ +// moment.js makes `moment` global on the window (or global) object, while Meteor expects a file-scoped global variable +moment = this.moment; +delete this.moment; diff --git a/www/lib/moment/meteor/test.js b/www/lib/moment/meteor/test.js new file mode 100644 index 00000000..6bf706a6 --- /dev/null +++ b/www/lib/moment/meteor/test.js @@ -0,0 +1,5 @@ +'use strict'; + +Tinytest.add('Moment.is', function (test) { + test.ok(moment.isMoment(moment()), {message: 'simple moment object'}); +}); -- cgit v1.2.3