vite_hanami 0.5.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +5 -2
- data/lib/vite_hanami/installation.rb +3 -3
- data/lib/vite_hanami/tag_helpers.rb +6 -0
- data/lib/vite_hanami/version.rb +1 -1
- metadata +8 -51
- data/CONTRIBUTING.md +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c5fe9aa3cf7213d8b4864fee89a361ccb1f4085e63c8b26ac383f7a8fdab44f
|
4
|
+
data.tar.gz: 131da7795b97f4b719b002312af11440366c22ba1b29b4b8cbd815901856e4af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95de8609722b44a23483d83841e6ec069c36963d1ee1f78f2dfaf842af6d8d1b23992280f765f03a8ee75bbebb92dc3214cad160478e377061f984d83688a11
|
7
|
+
data.tar.gz: bc1e77e6a4a8e2dadd5fda55418524dc323dcfc638b92a3ffbedae727d800c5fae36cb3c1a9831527de9fd65258c4bc023a3d0306f2a5231c16343207ae9a3e7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# [3.0.0](https://github.com/ElMassimo/vite_ruby/compare/vite_hanami@0.5.3...vite_hanami@3.0.0) (2021-08-16)
|
2
|
+
|
3
|
+
See https://github.com/ElMassimo/vite_ruby/pull/116 for features and breaking changes.
|
4
|
+
|
5
|
+
## [0.5.3](https://github.com/ElMassimo/vite_ruby/compare/vite_hanami@0.5.2...vite_hanami@0.5.3) (2021-04-21)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* Add helpers to enable HMR when using @vitejs/plugin-react-refresh ([a80f286](https://github.com/ElMassimo/vite_ruby/commit/a80f286d4305bbae29ea7cea42a4329a530f43fa))
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [0.5.2](https://github.com/ElMassimo/vite_ruby/compare/vite_hanami@0.5.1...vite_hanami@0.5.2) (2021-03-07)
|
15
|
+
|
16
|
+
- Add a bounded requirement to `vite_ruby` dependency.
|
17
|
+
|
1
18
|
## Vite Hanami 0.5.1 (2020-02-10)
|
2
19
|
|
3
20
|
- Install rake tasks in Rakefile by default.
|
data/README.md
CHANGED
@@ -46,8 +46,8 @@
|
|
46
46
|
[vite_rails]: https://github.com/ElMassimo/vite_ruby/tree/main/vite_rails
|
47
47
|
[vite_ruby]: https://github.com/ElMassimo/vite_ruby/tree/main/vite_ruby
|
48
48
|
[vite_hanami]: https://github.com/ElMassimo/vite_ruby/tree/main/vite_hanami
|
49
|
-
[no bundling]: https://vitejs.dev/guide/
|
50
|
-
[bundling]: https://vitejs.dev/guide/
|
49
|
+
[no bundling]: https://vitejs.dev/guide/why.html#the-problems
|
50
|
+
[bundling]: https://vitejs.dev/guide/why.html#why-bundle-for-production
|
51
51
|
|
52
52
|
[Vite] is to frontend tooling as Ruby to programming, pure joy! 😍
|
53
53
|
|
@@ -61,6 +61,8 @@ dev server is extremely __fast to start__, and your changes will be __updated in
|
|
61
61
|
In production, Vite [bundles your code][bundling]
|
62
62
|
with tree-shaking, lazy-loading, and common chunk splitting out of the box, to achieve optimal loading performance.
|
63
63
|
|
64
|
+
It also provides great defaults, and is easier to configure than similar tools like webpack.
|
65
|
+
|
64
66
|
## Features ⚡️
|
65
67
|
|
66
68
|
- 💡 Instant server start
|
@@ -106,6 +108,7 @@ Please use [Issues] to report bugs you find, and [Discussions] to make feature r
|
|
106
108
|
|
107
109
|
Don't hesitate to _⭐️ star the project_ if you find it useful!
|
108
110
|
|
111
|
+
Using it in production? Always love to hear about it! 😃
|
109
112
|
|
110
113
|
## Special Thanks 🙏
|
111
114
|
|
@@ -16,13 +16,13 @@ module ViteHanami::Installation
|
|
16
16
|
# Allow @vite/client to hot reload changes in development
|
17
17
|
security.content_security_policy(
|
18
18
|
security.content_security_policy
|
19
|
-
.sub('script-src', "script-src 'unsafe-eval'")
|
19
|
+
.sub('script-src', "script-src 'unsafe-eval' 'unsafe-inline'")
|
20
20
|
.sub('connect-src', "connect-src ws://\#{ ViteRuby.config.host_with_port }")
|
21
21
|
)
|
22
22
|
CSP
|
23
23
|
append root.join('Rakefile'), <<~RAKE
|
24
|
-
|
25
|
-
|
24
|
+
require 'vite_hanami'
|
25
|
+
ViteRuby.install_tasks
|
26
26
|
RAKE
|
27
27
|
end
|
28
28
|
|
@@ -9,6 +9,12 @@ module ViteHanami::TagHelpers
|
|
9
9
|
html.script(src: src, type: 'module')
|
10
10
|
end
|
11
11
|
|
12
|
+
# Public: Renders a script tag to enable HMR with React Refresh.
|
13
|
+
def vite_react_refresh
|
14
|
+
tag = vite_manifest.react_refresh_preamble
|
15
|
+
raw(tag) if tag
|
16
|
+
end
|
17
|
+
|
12
18
|
# Public: Resolves the path for the specified Vite asset.
|
13
19
|
#
|
14
20
|
# Example:
|
data/lib/vite_hanami/version.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vite_hanami
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
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-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vite_ruby
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.3.0
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.3.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop-performance
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
26
|
+
version: '3.0'
|
69
27
|
description:
|
70
28
|
email:
|
71
29
|
- maximomussini@gmail.com
|
@@ -74,7 +32,6 @@ extensions: []
|
|
74
32
|
extra_rdoc_files: []
|
75
33
|
files:
|
76
34
|
- CHANGELOG.md
|
77
|
-
- CONTRIBUTING.md
|
78
35
|
- LICENSE.txt
|
79
36
|
- README.md
|
80
37
|
- lib/vite_hanami.rb
|
@@ -86,8 +43,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
86
43
|
licenses:
|
87
44
|
- MIT
|
88
45
|
metadata:
|
89
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_hanami@0.
|
90
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_hanami@0.
|
46
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_hanami@3.0.0/vite_hanami
|
47
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_hanami@3.0.0/vite_hanami/CHANGELOG.md
|
91
48
|
post_install_message:
|
92
49
|
rdoc_options: []
|
93
50
|
require_paths:
|
data/CONTRIBUTING.md
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
## Setting Up a Development Environment
|
2
|
-
|
3
|
-
1. Install [Yarn](https://yarnpkg.com/)
|
4
|
-
|
5
|
-
2. Run the following commands to set up the development environment.
|
6
|
-
|
7
|
-
```
|
8
|
-
bundle install
|
9
|
-
```
|
10
|
-
|
11
|
-
## Making sure your changes pass all tests
|
12
|
-
There are a number of automated checks which run on GitHub Actions when a pull request is created.
|
13
|
-
You can run those checks on your own locally to make sure that your changes would not break the CI build.
|
14
|
-
|
15
|
-
### 1. Check the code for JavaScript style violations
|
16
|
-
```
|
17
|
-
yarn lint
|
18
|
-
```
|
19
|
-
|
20
|
-
### 2. Check the code for Ruby style violations
|
21
|
-
```
|
22
|
-
bundle exec rubocop
|
23
|
-
```
|
24
|
-
|
25
|
-
### 3. Run the JavaScript test suite
|
26
|
-
```
|
27
|
-
yarn test
|
28
|
-
```
|
29
|
-
|
30
|
-
### 4. Run the Ruby test suite
|
31
|
-
```
|
32
|
-
bundle exec rake test
|
33
|
-
```
|