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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60ac9b6c78cf973e7bddd6802c58dc779388e97572087c084870183c773ccf04
4
- data.tar.gz: '0529bd1129620c1e5693ca65fbf287e95b055741f5dcc05452645baa3422649d'
3
+ metadata.gz: 8b31efba828e0d1f3416c684638903a5d80e42978b1ebe30a67fd447ae8d2bad
4
+ data.tar.gz: 45dbe8cd7110c0e36401ab1816c5186265850f79337783cd7a034a1677a6697e
5
5
  SHA512:
6
- metadata.gz: 109e692e90567fe73e364229dfd1f8553914a85b486f5aa6a80ef6ff43a976533bd84ab730f3cf499bc820a9699c3daf1a48e49e38d188d7c85b3c2279952700
7
- data.tar.gz: bc18dd1cc2093a37cd3fa747c25d3ae5ff361f47b4483b5cee991804b3a6f95b2fd2dc4f64311e05cf839cff2cb6afdecfd80e8b691a0132e124debb0b1c10a1
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
- ## Usage
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
- Test: Within the `components_folder` (configs above), create a component like `myComponent.svelte`
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, "*")].any? { |f| f == full_path }
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 #{config_path}"
14
+ puts "Configuration file already exists at file://#{config_path}"
15
15
  else
16
16
  File.write(config_path, <<~YAML)
17
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: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Sedlmair