From 86b489e3d6a9efbefbc62e8531d0f5850934d4e1 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Wed, 9 Jan 2019 08:09:51 -0500 Subject: Move all npm packages to @rails scope Fixes #33083 --- actiontext/lib/templates/installer.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'actiontext/lib') diff --git a/actiontext/lib/templates/installer.rb b/actiontext/lib/templates/installer.rb index dc549a8af3..e7c6c2623e 100644 --- a/actiontext/lib/templates/installer.rb +++ b/actiontext/lib/templates/installer.rb @@ -8,15 +8,14 @@ say "Copying blob rendering partial to app/views/active_storage/blobs/_blob.html copy_file "#{__dir__}/../../app/views/active_storage/blobs/_blob.html.erb", "app/views/active_storage/blobs/_blob.html.erb" -# FIXME: Replace with release version on release say "Installing JavaScript dependency" -run "yarn add https://github.com/rails/actiontext" +run "yarn add @rails/actiontext" APPLICATION_PACK_PATH = "app/javascript/packs/application.js" -if File.exist?(APPLICATION_PACK_PATH) && File.read(APPLICATION_PACK_PATH) !~ /import "actiontext"/ +if File.exist?(APPLICATION_PACK_PATH) && File.read(APPLICATION_PACK_PATH) !~ /import "@rails\/actiontext"/ say "Adding import to default JavaScript pack" append_to_file APPLICATION_PACK_PATH, <<-EOS -import "actiontext" +import "@rails/actiontext" EOS end -- cgit v1.2.3