stimulus-rails 1.0.4 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,16 @@
1
1
  module Stimulus
2
2
  class Engine < ::Rails::Engine
3
+ # If you don't want to precompile Stimulus's assets (e.g., you're using jsbundling),
4
+ # you can do this in an initializer:
5
+ #
6
+ # config.after_initialize do
7
+ # config.assets.precompile -= Stimulus::Engine::PRECOMPILE_ASSETS
8
+ # end
9
+ PRECOMPILE_ASSETS = %w( stimulus.js stimulus.min.js stimulus.min.js.map ).freeze
10
+
3
11
  initializer "stimulus.assets" do
4
12
  if Rails.application.config.respond_to?(:assets)
5
- Rails.application.config.assets.precompile += %w( stimulus.js stimulus.min.js stimulus.min.js.map )
13
+ Rails.application.config.assets.precompile += PRECOMPILE_ASSETS
6
14
  end
7
15
  end
8
16
  end
@@ -15,7 +15,7 @@ module Stimulus::Manifest
15
15
 
16
16
  <<-JS
17
17
 
18
- import #{controller_class_name} from "./#{controller_path}"
18
+ import #{controller_class_name} from "./#{module_path}"
19
19
  application.register("#{tag_name}", #{controller_class_name})
20
20
  JS
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Stimulus
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-22 00:00:00.000000000 Z
13
+ date: 2022-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.2.32
79
+ rubygems_version: 3.3.20
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: A modest JavaScript framework for the HTML you already have.