aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/app
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-05-07 10:41:23 -0400
committerJeremy Daer <jeremydaer@gmail.com>2016-05-11 19:36:27 -0700
commit548c1d6e8b819ca4e02e6218b67107c580ee65f2 (patch)
treef97595c9f2982d2335ddfc36e51a7e38381b4ab5 /actioncable/app
parentd1794cd88c1de2f72ba35fd5cced42bc0f7528f9 (diff)
downloadrails-548c1d6e8b819ca4e02e6218b67107c580ee65f2.tar.gz
rails-548c1d6e8b819ca4e02e6218b67107c580ee65f2.tar.bz2
rails-548c1d6e8b819ca4e02e6218b67107c580ee65f2.zip
Publish Action Cable to NPM when we release.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
Diffstat (limited to 'actioncable/app')
-rw-r--r--actioncable/app/assets/javascripts/action_cable.coffee.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actioncable/app/assets/javascripts/action_cable.coffee.erb b/actioncable/app/assets/javascripts/action_cable.coffee.erb
index f0422d9d9c..32f9f517f4 100644
--- a/actioncable/app/assets/javascripts/action_cable.coffee.erb
+++ b/actioncable/app/assets/javascripts/action_cable.coffee.erb
@@ -33,3 +33,9 @@
if @debugging
messages.push(Date.now())
console.log("[ActionCable]", messages...)
+
+# NOTE: We expose ActionCable as a browser global so we can reference it
+# internally without concern for how the module is loaded.
+window?.ActionCable = @ActionCable
+
+module?.exports = @ActionCable