From 548c1d6e8b819ca4e02e6218b67107c580ee65f2 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 7 May 2016 10:41:23 -0400 Subject: Publish Action Cable to NPM when we release. Signed-off-by: Jeremy Daer --- .../app/assets/javascripts/action_cable.coffee.erb | 6 ++++++ actioncable/package.json | 24 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 actioncable/package.json (limited to 'actioncable') 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 diff --git a/actioncable/package.json b/actioncable/package.json new file mode 100644 index 0000000000..37f82fa1ea --- /dev/null +++ b/actioncable/package.json @@ -0,0 +1,24 @@ +{ + "name": "actioncable", + "version": "5.0.0-rc1", + "description": "WebSocket framework for Ruby on Rails.", + "main": "lib/assets/compiled/action_cable.js", + "files": [ + "lib/assets/compiled/*.js" + ], + "repository": { + "type": "git", + "url": "rails/rails" + }, + "keywords": [ + "websockets", + "actioncable", + "rails" + ], + "author": "David Heinemeier Hansson ", + "license": "MIT", + "bugs": { + "url": "https://github.com/rails/rails/issues" + }, + "homepage": "http://rubyonrails.org/" +} -- cgit v1.2.3