aboutsummaryrefslogtreecommitdiffstats
path: root/actiontext/lib
diff options
context:
space:
mode:
authorJavan Makhmali <javan@javan.us>2019-01-09 08:09:51 -0500
committerJavan Makhmali <javan@javan.us>2019-01-10 11:01:57 -0500
commit86b489e3d6a9efbefbc62e8531d0f5850934d4e1 (patch)
tree680d879e2a88d27d8cef6accdf327d076ae74343 /actiontext/lib
parent7aaf9b8076704426c5e3f20bc3018c398f58dc88 (diff)
downloadrails-86b489e3d6a9efbefbc62e8531d0f5850934d4e1.tar.gz
rails-86b489e3d6a9efbefbc62e8531d0f5850934d4e1.tar.bz2
rails-86b489e3d6a9efbefbc62e8531d0f5850934d4e1.zip
Move all npm packages to @rails scope
Fixes #33083
Diffstat (limited to 'actiontext/lib')
-rw-r--r--actiontext/lib/templates/installer.rb7
1 files changed, 3 insertions, 4 deletions
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