svelte-on-rails 1.0.1 → 1.0.3
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/README.md +37 -7
- data/lib/tasks/svelte_on_rails_tasks.rake +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2121111d74eaad3c6860fb874a038bc1c45391b87caad1dc183309f078cc3f6
|
4
|
+
data.tar.gz: 9fb8b1e68897f7d058e73c924320e13b3601c70fe37d4077bffbd0e02317544a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99e3cd5d5da270bfe4458c05d52ff67e351606c20db9db8423b214ca67b2e49ae00554f5c4226b0117f6583ed079384fbe527f1f0a5031b46fbc6cd640d7439f
|
7
|
+
data.tar.gz: af721320b1380e48eb0c0e4aeec447c419d186a70c0ac25003bb0424cb18d4351241725ed9aee7b6bce7530c7db1b540af931e27ef7d01010f039085fbfcc07b
|
data/README.md
CHANGED
@@ -1,6 +1,37 @@
|
|
1
|
-
|
1
|
+
<div style="text-align: center;">
|
2
|
+
<img src="./Svelte_Logo.svg.png" alt="Svelte Logo" height="120">
|
3
|
+
</div>
|
2
4
|
|
3
|
-
|
5
|
+
---
|
6
|
+
|
7
|
+
Svelte is the missing peace for ambitious Rails applications.
|
8
|
+
|
9
|
+
# Why?
|
10
|
+
|
11
|
+
On every app there are parts where you want it to shine. This is where Svelte comes in.
|
12
|
+
|
13
|
+
- Works perfectly with Hotwired/Turbo
|
14
|
+
- Perfect addition to Stimulus
|
15
|
+
- Easy to learn
|
16
|
+
- Powerful
|
17
|
+
- **Compared to Stimulus**
|
18
|
+
- No more writing double logic of the initial HTML state
|
19
|
+
- Stimulus is good for parts where you have simple and little javascript and lots of html
|
20
|
+
- The more complexity, the more you will love svelte
|
21
|
+
- **Compared to React**
|
22
|
+
- No Shadow dom
|
23
|
+
- Slimmer packages
|
24
|
+
- Easier to learn
|
25
|
+
- Faster
|
26
|
+
|
27
|
+
Have a look at this entertaining video [rethinking reactivity](https://svelte.dev/blog/svelte-3-rethinking-reactivity)
|
28
|
+
by Rich Harris, especially from 3:50 to 6:40 and his comparison to react.
|
29
|
+
|
30
|
+
This all fits perfectly with the Rails way of minimalist javascript, but: Where we need it, we have it.
|
31
|
+
|
32
|
+
# Svelte on Rails 👍
|
33
|
+
|
34
|
+
Rock-solid and seamless integration of Svelte Components into Rails views, based on `vite_rails`.
|
4
35
|
|
5
36
|
By default, and when installed together with `@hotwired/turbo-rails`, it renders
|
6
37
|
svelte components on the first request server side («SSR») and for subsequent
|
@@ -18,7 +49,7 @@ and [ElMassimo](https://github.com/ElMassimo) for inspiring and helping me with
|
|
18
49
|
It has a 100% test coverage, all tests pass.
|
19
50
|
It is not yet implemented on my customer projects, but this will follow soon.
|
20
51
|
|
21
|
-
If you have issues, please open one and contributors are welcome!
|
52
|
+
If you have issues, please open one, and contributors are welcome!
|
22
53
|
|
23
54
|
## Requirements
|
24
55
|
|
@@ -201,8 +232,7 @@ rake svelte_on_rails:create_contributor_configs_file
|
|
201
232
|
and define a `generated_test_app_folder_path` (required) for apps, generated for the testings.
|
202
233
|
|
203
234
|
For development of the **npm package @csedl/svelte-on-rails** (optional) please download the source code of the
|
204
|
-
npm package and set
|
205
|
-
`local_npm_package_path` and set the path to the npm package on your local machine.
|
235
|
+
npm package and set `local_npm_package_path` on the config file to the path to the npm package on your local machine.
|
206
236
|
This will cause the installer, to install the npm package from a local path instead from the npm registry.
|
207
237
|
|
208
238
|
Then run the tests and start contributing.
|
@@ -247,9 +277,9 @@ side could live on the same assets and manifest like svelte components that are
|
|
247
277
|
compiled as chunks which each is its own entry point. This failed:
|
248
278
|
|
249
279
|
- The `vite-plugin-ruby` did not support this: it constrained all to one entry point.
|
250
|
-
- See how fat the `vite-ssr.config.ts
|
280
|
+
- See how fat the `vite-ssr.config.ts` is. For the client side this is not necessary.
|
251
281
|
|
252
|
-
At the end, I decided to split the process. But that is not the last decision.
|
282
|
+
At the end, I decided to split the process. For now it is cleaner. But that is not the last decision.
|
253
283
|
|
254
284
|
**Why not compiling server side purely by rollup?**
|
255
285
|
|
@@ -12,7 +12,6 @@ if defined?(Rails) && Rake::Task.task_defined?("assets:precompile")
|
|
12
12
|
end
|
13
13
|
|
14
14
|
|
15
|
-
require_relative '../../spec/test_helpers'
|
16
15
|
require_relative '../../lib/svelte_on_rails/installer/hello_world'
|
17
16
|
require_relative '../../lib/generators/svelte_on_rails/install/install_generator'
|
18
17
|
|
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: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Sedlmair
|
@@ -95,6 +95,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
requirements: []
|
96
96
|
rubygems_version: 3.6.7
|
97
97
|
specification_version: 4
|
98
|
-
summary:
|
98
|
+
summary: Rock-solid and seamless integration of Svelte Components into Rails views,
|
99
99
|
based on vite_rails.
|
100
100
|
test_files: []
|