hotwire-spark 0.1.8 → 0.1.9
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/app/assets/javascripts/hotwire_spark.js +3 -2131
- data/app/assets/javascripts/hotwire_spark.min.js +1 -1
- data/app/assets/javascripts/hotwire_spark.min.js.map +1 -1
- data/app/javascript/hotwire/spark/reloaders/stimulus_reloader.js +1 -2
- data/lib/hotwire/spark/action_cable/server.rb +1 -1
- data/lib/hotwire/spark/engine.rb +4 -0
- data/lib/hotwire/spark/installer.rb +4 -6
- data/lib/hotwire/spark/version.rb +1 -1
- metadata +6 -6
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Application } from "@hotwired/stimulus"
|
2
1
|
import { log } from "../logger.js"
|
3
2
|
import { cacheBustedUrl, reloadHtmlDocument } from "../helpers.js"
|
4
3
|
|
@@ -11,7 +10,7 @@ export class StimulusReloader {
|
|
11
10
|
constructor(document, filePattern = /./) {
|
12
11
|
this.document = document
|
13
12
|
this.filePattern = filePattern
|
14
|
-
this.application = window.Stimulus
|
13
|
+
this.application = window.Stimulus
|
15
14
|
}
|
16
15
|
|
17
16
|
async reload() {
|
data/lib/hotwire/spark/engine.rb
CHANGED
@@ -18,6 +18,10 @@ module Hotwire::Spark
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
initializer "hotwire_spark.assets" do |application|
|
22
|
+
application.config.assets.precompile << "hotwire_spark.js"
|
23
|
+
end
|
24
|
+
|
21
25
|
initializer "hotwire_spark.install" do |application|
|
22
26
|
Hotwire::Spark.install_into application if Hotwire::Spark.enabled?
|
23
27
|
end
|
@@ -1,6 +1,4 @@
|
|
1
1
|
class Hotwire::Spark::Installer
|
2
|
-
attr_reader :file_watcher
|
3
|
-
|
4
2
|
def initialize(application)
|
5
3
|
@application = application
|
6
4
|
end
|
@@ -11,10 +9,6 @@ class Hotwire::Spark::Installer
|
|
11
9
|
monitor_paths
|
12
10
|
end
|
13
11
|
|
14
|
-
def configure_middleware
|
15
|
-
middleware.use Hotwire::Spark::Middleware
|
16
|
-
end
|
17
|
-
|
18
12
|
private
|
19
13
|
attr_reader :application
|
20
14
|
delegate :middleware, to: :application
|
@@ -25,6 +19,10 @@ class Hotwire::Spark::Installer
|
|
25
19
|
end
|
26
20
|
end
|
27
21
|
|
22
|
+
def configure_middleware
|
23
|
+
middleware.use Hotwire::Spark::Middleware
|
24
|
+
end
|
25
|
+
|
28
26
|
def monitor_paths
|
29
27
|
register_monitored_paths
|
30
28
|
file_watcher.start
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotwire-spark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jorge Manrubia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -142,13 +142,13 @@ files:
|
|
142
142
|
- lib/hotwire/spark/middleware.rb
|
143
143
|
- lib/hotwire/spark/version.rb
|
144
144
|
- lib/tasks/hotwire_spark_tasks.rake
|
145
|
-
homepage: https://github.com/
|
145
|
+
homepage: https://github.com/hotwired/spark
|
146
146
|
licenses:
|
147
147
|
- MIT
|
148
148
|
metadata:
|
149
|
-
homepage_uri: https://github.com/
|
150
|
-
source_code_uri: https://github.com/
|
151
|
-
changelog_uri: https://github.com/
|
149
|
+
homepage_uri: https://github.com/hotwired/spark
|
150
|
+
source_code_uri: https://github.com/hotwired/spark
|
151
|
+
changelog_uri: https://github.com/hotwired/spark
|
152
152
|
post_install_message:
|
153
153
|
rdoc_options: []
|
154
154
|
require_paths:
|