svelte-on-rails 0.0.13 → 0.0.14
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 +4 -2
- data/lib/svelte_on_rails/render_server_side.rb +3 -1
- data/lib/tasks/svelte_on_rails_tasks.rake +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b31efba828e0d1f3416c684638903a5d80e42978b1ebe30a67fd447ae8d2bad
|
4
|
+
data.tar.gz: 45dbe8cd7110c0e36401ab1816c5186265850f79337783cd7a034a1677a6697e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a73256d665867beb93c8221ecbdda94c4f8a5fab1cad3e226c4345804bd13a101b0da58177a6b9e58eeb822ca5bed99cd124eba01e939da348f5ec15ab2ca35
|
7
|
+
data.tar.gz: e7d878a42a7b7e57db9a9c061d059b7e8afd26a46df0f1bf1eac431227e3575d44f944bed9b0362bbb42b2d8343a43c1487b87012d7d68975d7a78b0d9587002
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ This will create a little config file, please read the comments there and set th
|
|
54
54
|
|
55
55
|
Set up the npm module [@csedl/svelte-on-rails](https://www.npmjs.com/package/@csedl/svelte-on-rails) on the client side.
|
56
56
|
|
57
|
-
##
|
57
|
+
## Test if it works
|
58
58
|
|
59
59
|
On the view
|
60
60
|
|
@@ -62,7 +62,7 @@ On the view
|
|
62
62
|
= svelte_component("myComponent", items: ['item1', 'item2'])
|
63
63
|
```
|
64
64
|
|
65
|
-
|
65
|
+
Within the `components_folder` (configs above), create a component like `myComponent.svelte`
|
66
66
|
|
67
67
|
```sveltehtml
|
68
68
|
<script>
|
@@ -94,6 +94,8 @@ And you should see «Greetings from svelte» on the browser.
|
|
94
94
|
|
95
95
|
Click the counter button and check if the component is alive.
|
96
96
|
|
97
|
+
Without the npm package installed, you would see the same html, but the increment button would not work.
|
98
|
+
|
97
99
|
I inserted very detailed error messages on rails and on the
|
98
100
|
npm package, so please check the logs on your browser.
|
99
101
|
|
@@ -125,7 +125,9 @@ module SvelteOnRails
|
|
125
125
|
full_path = File.join(containing_dir, filename)
|
126
126
|
|
127
127
|
# Check if the file exists and the path matches case-sensitively
|
128
|
-
File.exist?(full_path) && Dir[File.join(containing_dir, "
|
128
|
+
File.exist?(full_path) && Dir[File.join(containing_dir, "**/*")].any? do |f|
|
129
|
+
f == full_path
|
130
|
+
end
|
129
131
|
end
|
130
132
|
|
131
133
|
|
@@ -11,7 +11,7 @@ namespace :svelte_on_rails do
|
|
11
11
|
config_path = Rails.root.join("config", "svelte_on_rails.yml")
|
12
12
|
|
13
13
|
if File.exist?(config_path)
|
14
|
-
puts "Configuration file already exists at
|
14
|
+
puts "Configuration file already exists at file://#{config_path}"
|
15
15
|
else
|
16
16
|
File.write(config_path, <<~YAML)
|
17
17
|
|