diff options
author | Javan Makhmali <javan@javan.us> | 2019-01-09 08:09:51 -0500 |
---|---|---|
committer | Javan Makhmali <javan@javan.us> | 2019-01-10 11:01:57 -0500 |
commit | 86b489e3d6a9efbefbc62e8531d0f5850934d4e1 (patch) | |
tree | 680d879e2a88d27d8cef6accdf327d076ae74343 /railties/lib/rails/generators | |
parent | 7aaf9b8076704426c5e3f20bc3018c398f58dc88 (diff) | |
download | rails-86b489e3d6a9efbefbc62e8531d0f5850934d4e1.tar.gz rails-86b489e3d6a9efbefbc62e8531d0f5850934d4e1.tar.bz2 rails-86b489e3d6a9efbefbc62e8531d0f5850934d4e1.zip |
Move all npm packages to @rails scope
Fixes #33083
Diffstat (limited to 'railties/lib/rails/generators')
3 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js b/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js index 76ca3d0f2f..eec7e54b8a 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +++ b/railties/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js @@ -1,6 +1,6 @@ // Action Cable provides the framework to deal with WebSockets in Rails. // You can generate new channels where WebSocket features live using the `rails generate channel` command. -import ActionCable from "actioncable" +import ActionCable from "@rails/actioncable" export default ActionCable.createConsumer() diff --git a/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt b/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt index 4d7a145cd6..de91713546 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt @@ -3,7 +3,7 @@ // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. -import Rails from "rails-ujs" +import Rails from "@rails/ujs" Rails.start() <%- unless options[:skip_turbolinks] -%> @@ -12,7 +12,7 @@ Turbolinks.start() <%- end -%> <%- unless skip_active_storage? -%> -import * as ActiveStorage from "activestorage" +import * as ActiveStorage from "@rails/activestorage" ActiveStorage.start() <%- end -%> <%- unless options[:skip_action_cable] -%> diff --git a/railties/lib/rails/generators/rails/app/templates/package.json.tt b/railties/lib/rails/generators/rails/app/templates/package.json.tt index 7174116989..07207e1747 100644 --- a/railties/lib/rails/generators/rails/app/templates/package.json.tt +++ b/railties/lib/rails/generators/rails/app/templates/package.json.tt @@ -2,10 +2,10 @@ "name": "<%= app_name %>", "private": true, "dependencies": { - "rails-ujs": ">=5.2.1"<% unless options[:skip_turbolinks] %>, - "turbolinks": "5.1.1"<% end -%><% unless skip_active_storage? %>, - "activestorage": ">=5.2.1"<% end -%><% unless options[:skip_action_cable] %>, - "actioncable": ">=5.2.1"<% end %> + "@rails/ujs": "^6.0.0-alpha"<% unless options[:skip_turbolinks] %>, + "turbolinks": "^5.2.0"<% end -%><% unless skip_active_storage? %>, + "@rails/activestorage": "^6.0.0-alpha"<% end -%><% unless options[:skip_action_cable] %>, + "@rails/actioncable": "^6.0.0-alpha"<% end %> }, "version": "0.1.0" } |