turbo_ready 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +39 -34
- data/README.md +6 -7
- data/app/assets/builds/turbo_ready.js +4 -4
- data/app/assets/builds/turbo_ready.js.map +3 -3
- data/app/javascript/index.js +15 -4
- data/lib/turbo_ready/version.rb +1 -1
- data/package.json +3 -3
- data/tags +8979 -7713
- data/yarn.lock +196 -207
- metadata +2 -2
data/app/javascript/index.js
CHANGED
@@ -1,7 +1,18 @@
|
|
1
1
|
import invoke from './invoke'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
if (!self['Turbo'])
|
4
|
+
throw new Error(
|
5
|
+
'`Turbo` is not defined! Be sure to import `turbo_ready` after `@hotwired/turbo` or `@hotwired/turbo-rails`.'
|
6
|
+
)
|
6
7
|
|
7
|
-
|
8
|
+
if (!Turbo['StreamActions'])
|
9
|
+
throw new Error(
|
10
|
+
'`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.'
|
11
|
+
)
|
12
|
+
|
13
|
+
Turbo.StreamActions.invoke = invoke
|
14
|
+
self.TurboReady = { StreamActions: { invoke } }
|
15
|
+
|
16
|
+
console.info(
|
17
|
+
'TurboReady has initialized and has registered new stream actions with Turbo.'
|
18
|
+
)
|
data/lib/turbo_ready/version.rb
CHANGED
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "turbo_ready",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.2",
|
4
4
|
"description": "Take full control of the DOM with Turbo Streams",
|
5
5
|
"main": "app/javascript/index.js",
|
6
6
|
"repository": "https://github.com/hopsoft/turbo_ready",
|
@@ -10,14 +10,14 @@
|
|
10
10
|
"@hotwired/turbo-rails": ">= 7.1"
|
11
11
|
},
|
12
12
|
"devDependencies": {
|
13
|
-
"esbuild": "^0.
|
13
|
+
"esbuild": "^0.16.3",
|
14
14
|
"eslint": "^8.19.0",
|
15
15
|
"flowbite": "^1.5.3",
|
16
16
|
"prettier-standard": "^16.4.1",
|
17
17
|
"rustywind": "^0.15.1"
|
18
18
|
},
|
19
19
|
"scripts": {
|
20
|
-
"build": "esbuild app/javascript/index.js --bundle --minify --sourcemap --format=esm --outfile=app/assets/builds/turbo_ready.js"
|
20
|
+
"build": "esbuild app/javascript/index.js --bundle --minify --sourcemap --format=esm --target=es2017 --analyze --outfile=app/assets/builds/turbo_ready.js"
|
21
21
|
},
|
22
22
|
"dependencies": {
|
23
23
|
"@alpinejs/morph": ">=3.10.4",
|