From 60030ce0d00d2d83bb5374a7bec43573d0ba5cda Mon Sep 17 00:00:00 2001 From: Dan McClain Date: Fri, 10 Jun 2016 22:55:47 -0400 Subject: [PATCH] Export modules with RSVP to avoid destructuring --- app-shims.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app-shims.js b/app-shims.js index 00c842f..0c3d6ca 100644 --- a/app-shims.js +++ b/app-shims.js @@ -252,6 +252,17 @@ processEmberShims(); processTestShims(); + + var rsvpExport = { 'default': Ember.RSVP }; + var rsvpModules = [ + 'cast', 'Promise', 'EventTarget', 'all', 'allSettled', 'race', 'hash', + 'hashSettled', 'rethrow', 'defer', 'denodeify', 'configure', 'on', 'off', + 'resolve', 'reject', 'async', 'map', 'filter' + ]; + for (var i = 0; i < rsvpModules.length; i ++) { + var key = rsvpModules[i]; + rsvpExport[key] = Ember.RSVP[key]; + } + generateModule('rsvp', rsvpExport); generateModule('jquery', { 'default': self.jQuery }); - generateModule('rsvp', { 'default': Ember.RSVP }); })();