vite_rails 2.0.12 → 3.0.0

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: e2c44cc28668a8e61804ef2480f063517f6867ef609380f625f5cd3ff9acc098
4
- data.tar.gz: da6a1d70b91bc28e6d97255b8e28e81739d7a5c4cf9d7d9bbdafdbf8d038f0e8
3
+ metadata.gz: d9378f7c4370df9ef747fce41e397f90a106ca3117c59750cdc6c17cc0799981
4
+ data.tar.gz: 8c99cbfe0db03762f30d6c45c933549357599dc63f8c14b6e48c8fbf580ea4cc
5
5
  SHA512:
6
- metadata.gz: 121240efd1fae220ac24a3caca2170095ffa39a3dd4684b9920136a13341e6af2fcb49d5295e8fe5113f6a38bade36ed5ede62a1b06d124a19836f21a54f6c7d
7
- data.tar.gz: c6c51711be2dafa0ff0245438d1ba8c401cbf10c377d21284d863c45aa6e2a72198cb5487c1643c636a97e9ac25234d48465ff04f62e20fa79a2989ebdb82ea0
6
+ metadata.gz: 146f5dfd12b2a9388569264944bef6f4a19f6c958a3d36dd2e42ef68848f669c214133c6ae4d0209b064f879abcd3a9f635fd1a46791b56590f9088b60fc3475
7
+ data.tar.gz: 2df8f74a0b3d19aeb40bb889ff3d87131150b2ee60157bc556296f2660bd0aa83894d170b4fd6cf6e0141c04a426e04554cf3f8ce4dc4e9a963dfb3d1d0b02c9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # [3.0.0](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.13...vite_rails@3.0.0) (2021-08-16)
2
+
3
+ See https://github.com/ElMassimo/vite_ruby/pull/116 for features and breaking changes.
4
+
5
+ ## [2.0.13](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.12...vite_rails@2.0.13) (2021-07-27)
6
+
7
+
8
+ ### Features
9
+
10
+ * Set config.javascript_path so that zeitwerk ignores frontend files ([bab359f](https://github.com/ElMassimo/vite_ruby/commit/bab359f66a5942904e91e2a1a51b440072ba44af))
11
+
12
+
13
+
1
14
  ## [2.0.12](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.11...vite_rails@2.0.12) (2021-05-24)
2
15
 
3
16
 
@@ -9,6 +22,9 @@
9
22
 
10
23
  ## [2.0.11](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.10...vite_rails@2.0.11) (2021-05-10)
11
24
 
25
+ ### Refactor
26
+
27
+ * Avoid reference to `dry-cli` during installation, use internal APIs instead ([f5b87e](https://github.com/ElMassimo/vite_ruby/commit/f5b87e69790e48397d15e609b44118e399c9493d))
12
28
 
13
29
 
14
30
  ## [2.0.10](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@2.0.9...vite_rails@2.0.10) (2021-04-21)
@@ -33,4 +33,9 @@ class ViteRails::Engine < Rails::Engine
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ initializer 'vite_rails.set_source' do |app|
38
+ source_dir = ViteRuby.config.root.join(ViteRuby.config.source_code_dir)
39
+ app.config.javascript_path = source_dir.relative_path_from(Rails.root.join('app')).to_s
40
+ end
36
41
  end
@@ -14,6 +14,7 @@ module ViteRails::Installation
14
14
  replace_first_line config.config_path, 'app/frontend', %( "sourceCodeDir": "#{ dir }",)
15
15
  end
16
16
  setup_content_security_policy root.join('config/initializers/content_security_policy.rb')
17
+ append root.join('Procfile.dev'), 'web: bin/rails s'
17
18
  end
18
19
 
19
20
  # Internal: Configure CSP rules that allow to load @vite/client correctly.
@@ -30,7 +31,7 @@ module ViteRails::Installation
30
31
  CSP
31
32
  inject_line_after csp_file, 'policy.script_src', <<~CSP
32
33
  # Allow @vite/client to hot reload changes in development
33
- # policy.script_src *policy.script_src, :unsafe_eval, "http://#{ ViteRuby.config.host_with_port }" if Rails.env.development?
34
+ # policy.script_src *policy.script_src, :unsafe_eval, "http://\#{ ViteRuby.config.host_with_port }" if Rails.env.development?
34
35
  CSP
35
36
  end
36
37
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViteRails
4
- VERSION = '2.0.12'
4
+ VERSION = '3.0.0'
5
5
  end
@@ -0,0 +1 @@
1
+ web: bin/rails server
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.0'
39
+ version: '3.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.0'
46
+ version: '3.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: spring
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -75,14 +75,15 @@ files:
75
75
  - lib/vite_rails/installation.rb
76
76
  - lib/vite_rails/tag_helpers.rb
77
77
  - lib/vite_rails/version.rb
78
+ - templates/Procfile.dev
78
79
  - templates/config/rails-vite.json
79
80
  - templates/entrypoints/application.js
80
81
  homepage: https://github.com/ElMassimo/vite_ruby
81
82
  licenses:
82
83
  - MIT
83
84
  metadata:
84
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@2.0.12/vite_rails
85
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@2.0.12/vite_rails/CHANGELOG.md
85
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.0/vite_rails
86
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.0/vite_rails/CHANGELOG.md
86
87
  post_install_message:
87
88
  rdoc_options: []
88
89
  require_paths: