Skip to content

Commit ffda0c9

Browse files
authored
Namespace npm package (#54)
1 parent ea69b27 commit ffda0c9

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $ bundle install
2626

2727
This gem requires Webpacker for the Javascript. Add the npm package:
2828
```bash
29-
$ yarn add activeadmin-chat
29+
$ yarn add @rootstrap/activeadmin-chat
3030
```
3131

3232
And install it:
@@ -62,7 +62,7 @@ Add including of CSS to `app/assets/stylesheets/active_admin.css.scss`:
6262

6363
Create a file named `app/javascript/packs/activeadmin-chat.js`, with the following content:
6464
```js
65-
import 'activeadmin-chat';
65+
import '@rootstrap/activeadmin-chat';
6666
```
6767

6868
### Example diagram

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "activeadmin-chat",
2+
"name": "@rootstrap/activeadmin-chat",
33
"version": "1.0.1",
44
"description": "Get a chat for your ActiveAdmin app out of the box.",
55
"main": "javascript/index.js",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import 'activeadmin-chat';
1+
import '@rootstrap/activeadmin-chat';

spec/dummy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"dependencies": {
55
"@rails/webpacker": "5.1.1",
6-
"activeadmin-chat": "file:../.."
6+
"@rootstrap/activeadmin-chat": "file:../.."
77
},
88
"devDependencies": {
99
"webpack-dev-server": "^3.11.0"

spec/dummy/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,10 @@
843843
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
844844
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
845845

846-
"@rails/actioncable@^6.0.3-1":
847-
version "6.0.3-2"
848-
resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.0.3-2.tgz#18933d870649e356f3c47a134af9430f17ce51ca"
849-
integrity sha512-zgMwnvn0zmJuy1N7IgZpd4X1ERWBL/bd9ZrqaSKtWay7F4ZB+Q6F5dc1D2I3IyUYYQU5dssQb5VaygvMLc7+GA==
846+
"@rails/actioncable@>= 6.0":
847+
version "6.0.3"
848+
resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.0.3.tgz#722b4b639936129307ddbab3a390f6bcacf3e7bc"
849+
integrity sha512-I01hgqxxnOgOtJTGlq0ZsGJYiTEEiSGVEGQn3vimZSqEP1HqzyFNbzGTq14Xdyeow2yGJjygjoFF1pmtE+SQaw==
850850

851851
"@rails/webpacker@5.1.1":
852852
version "5.1.1"
@@ -892,6 +892,11 @@
892892
webpack-cli "^3.3.11"
893893
webpack-sources "^1.4.3"
894894

895+
"@rootstrap/activeadmin-chat@file:../..":
896+
version "1.0.1"
897+
dependencies:
898+
"@rails/actioncable" ">= 6.0"
899+
895900
"@types/glob@^7.1.1":
896901
version "7.1.3"
897902
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
@@ -1098,11 +1103,6 @@ acorn@^6.4.1:
10981103
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474"
10991104
integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
11001105

1101-
"activeadmin-chat@file:../..":
1102-
version "1.0.1"
1103-
dependencies:
1104-
"@rails/actioncable" "^6.0.3-1"
1105-
11061106
aggregate-error@^3.0.0:
11071107
version "3.1.0"
11081108
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"

spec/rails_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def link_client!
106106
return if @linked
107107

108108
yarn! '--cwd', '../../..', 'link'
109-
yarn! 'link', 'activeadmin-chat'
109+
yarn! 'link', '@rootstrap/activeadmin-chat'
110110
yarn! 'install'
111111

112112
clear_webpacker_cache!
@@ -117,7 +117,7 @@ def link_client!
117117
def unlink_client!
118118
return unless @linked
119119

120-
yarn! 'unlink', 'activeadmin-chat'
120+
yarn! 'unlink', '@rootstrap/activeadmin-chat'
121121
end
122122

123123
private

0 commit comments

Comments
 (0)