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 /actiontext | |
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 'actiontext')
-rw-r--r-- | actiontext/app/javascript/actiontext/attachment_upload.js | 2 | ||||
-rw-r--r-- | actiontext/lib/templates/installer.rb | 7 | ||||
-rw-r--r-- | actiontext/package.json | 6 | ||||
-rw-r--r-- | actiontext/test/dummy/app/javascript/packs/application.js | 2 | ||||
-rw-r--r-- | actiontext/yarn.lock | 11 |
5 files changed, 8 insertions, 20 deletions
diff --git a/actiontext/app/javascript/actiontext/attachment_upload.js b/actiontext/app/javascript/actiontext/attachment_upload.js index a716f1f589..77fbc97df6 100644 --- a/actiontext/app/javascript/actiontext/attachment_upload.js +++ b/actiontext/app/javascript/actiontext/attachment_upload.js @@ -1,4 +1,4 @@ -import { DirectUpload } from "activestorage" +import { DirectUpload } from "@rails/activestorage" export class AttachmentUpload { constructor(attachment, element) { 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 diff --git a/actiontext/package.json b/actiontext/package.json index b42838b1df..ec8f35fd3c 100644 --- a/actiontext/package.json +++ b/actiontext/package.json @@ -1,5 +1,5 @@ { - "name": "actiontext", + "name": "@rails/actiontext", "version": "6.0.0-alpha", "description": "Edit and display rich text in Rails applications", "main": "app/javascript/actiontext/index.js", @@ -21,7 +21,7 @@ ], "license": "MIT", "dependencies": { - "trix": ">=1.0.0", - "activestorage": "6.0.0-alpha" + "trix": "^1.0.0", + "@rails/activestorage": "^6.0.0-alpha" } } diff --git a/actiontext/test/dummy/app/javascript/packs/application.js b/actiontext/test/dummy/app/javascript/packs/application.js index 90eb1a1841..13ac17ed58 100644 --- a/actiontext/test/dummy/app/javascript/packs/application.js +++ b/actiontext/test/dummy/app/javascript/packs/application.js @@ -1 +1 @@ -import "actiontext" +import "@rails/actiontext" diff --git a/actiontext/yarn.lock b/actiontext/yarn.lock deleted file mode 100644 index f98622eb64..0000000000 --- a/actiontext/yarn.lock +++ /dev/null @@ -1,11 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"activestorage@>= 5.2.0-rc1": - version "5.2.0-rc1" - resolved "https://registry.yarnpkg.com/activestorage/-/activestorage-5.2.0-rc1.tgz#79898996eceb0f13575eff41fb109051fbfa49b0" - -trix@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/trix/-/trix-0.11.1.tgz#ffe54f2757c2c2385b8424fd5c5d2ab712a09acc" |