svelte-on-rails 9.1.0 → 9.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 148d58c862740c4a3c5d5715359df0450703f83128cf38ddb782dac35585709c
4
- data.tar.gz: 615ec4cdeaf8024d762e332a875fda94ed51ac59336f2525578b67432c9858ec
3
+ metadata.gz: e630de6ad00dc33b2fb616df6f5c5d7deef3e23c3ee0f05a1d50754a85cf165a
4
+ data.tar.gz: 43f856361a8c9323357914e610b3279b00ce8c086afc88c1f3dc1e1e5f452d9e
5
5
  SHA512:
6
- metadata.gz: 32bea744a051827875dc6e9ed0668b5a527018c1dc2f291df4e020aa6e9b2efed40d4e1b41dfa53117131dffd9e12005d5c1f711c5cd89a6383f57dabdcaba7e
7
- data.tar.gz: 0b870713e8adab22f8fb06d2a0a0786db941fdda4696018504ffeed9eb5f752d2b0a3d88078e257528ba6b94ecac0b8700ba4a2a88179230e6a4c7db3414e3e6
6
+ metadata.gz: 4584fb9c068a9a42907e9f10b1bd24da3726080b622975b654171bc53aa2719269b18cefdbc9b240d8149f0e05c53c1a86c3e0858ccb85edff109ff3f17130d4
7
+ data.tar.gz: 125febeda32e5400c83f5c10d86228d10300de05d4e705b2819268df7f747a0de4d763f048f1dad57d714c35d94167fcc1cff5639fbbfbd6c6bc22a7c1aef692
data/README.md CHANGED
@@ -7,6 +7,8 @@
7
7
 
8
8
  Realizing [DHH's vision](https://rubyonrails.org/2021/12/15/Rails-7-fulfilling-a-vision) with modern front-end technologies.
9
9
 
10
+ `svelte-on-rails` does not yet have many downloads on RubyGems. However, as it is integrated into the apps of my biggest customers, it will certainly be maintained.
11
+
10
12
  # Why Integrate Svelte?
11
13
 
12
14
  Svelte offers the simplest and most elegant soulution to building reactive, high-performance front-end components.
@@ -4,11 +4,7 @@ module SvelteOnRails
4
4
  module Generators
5
5
  class InstallGenerator < Rails::Generators::Base
6
6
 
7
- class_option :full, type: :boolean, default: false, desc: "Run full installation with additional setup"
8
7
  class_option :force, type: :boolean, default: false, desc: "Do not ask for overwriting files"
9
- class_option :turbo, type: :boolean, default: false, desc: "Use @hotwired/turbo-rails"
10
- class_option :turbo_streams, type: :boolean, default: false, desc: "Turbo::StreamsChannel"
11
- class_option :hello_world, type: :boolean, default: false, desc: "Create Hello World component"
12
8
 
13
9
  require 'svelte_on_rails/installer/utils'
14
10
  require 'svelte_on_rails/installer/haml'
@@ -76,9 +72,6 @@ module SvelteOnRails
76
72
  raise Thor::Error, "Unknown options: #{unknown_options.join(', ')}. Valid options are: #{valid_display}\nNothing done."
77
73
  end
78
74
 
79
- if options[:turbo_streams] && !(options[:full] || options[:turbo])
80
- raise Thor::Error, "--turbo-streams option cannot be used without --turbo"
81
- end
82
75
  end
83
76
 
84
77
  def application_js_path
@@ -4,16 +4,33 @@ module SvelteOnRails
4
4
  module Generators
5
5
  class UpdateGenerator < Rails::Generators::Base
6
6
 
7
- def vite_config
7
+ class_option :compile, type: :boolean, default: false, desc: "Compile Svelte assets only"
8
+
9
+ def initialize(*args)
10
+
11
+ super
12
+
13
+ puts
14
+
15
+ @option_choosed = options[:compile]
16
+ end
17
+
18
+ def updating
8
19
 
9
20
  puts '-' * 80
10
21
  puts ' ▶︎▶︎▶︎ UPDATING SVELTE-ON-RAILS GEM'
11
22
  puts '-' * 80
12
23
 
13
- utils = SvelteOnRails::Installer::Utils
14
- utils.write_templates(['config_base'], ask_for_overwrite: true, only: ['vite-ssr.config.ts'])
24
+ i_utils = SvelteOnRails::Installer::Utils
25
+ utils = SvelteOnRails::Lib::Utils
26
+
27
+ !@option_choosed && i_utils.write_templates(['config_base'], ask_for_overwrite: true, only: ['vite-ssr.config.ts'])
28
+
29
+ puts '-' * 80
30
+ puts ' ▶︎▶︎▶︎ Updated svelte-on-rails gem, now precompiling svelte assets....'
31
+ puts '-' * 80
32
+ utils.precompile
15
33
 
16
- puts "Update vite.config.js"
17
34
  end
18
35
 
19
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svelte-on-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.0
4
+ version: 9.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Sedlmair