svelte-on-rails 0.0.23 → 0.0.25
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/lib/svelte_on_rails/installer/rails_template/app/frontend/javascript/components/SvelteOnRailsHelloWorld.svelte +24 -7
- data/lib/svelte_on_rails/installer/rails_template/app/views/svelte_on_rails_hello_world/index.haml +2 -2
- data/lib/tasks/svelte_on_rails_tasks.rake +6 -9
- 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: 8263684fe285763605b75de1b9b4d4e72f6c3292742fb9eebb551a708b13f323
|
4
|
+
data.tar.gz: 6f10c28aca7e69a0b3a6cf73f0900aedd667388420bda2bc80d80d531c84c2f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518c1924296b238f4ac82606b5b9ab4d8afe83c15e78b37269ed02d0e3e029b97daf088a3b7b0ba40232792295bef45f77e5db001b5074eab0adf3db97a30800
|
7
|
+
data.tar.gz: 0f7c0baf8700d6ca0c812f9537d2aa97421d04626e27e9288ba3d96425f9546e1e53bbd575b6efa77b12c27878d67d76350d0d00fd658d2b849a56643e75a1a6
|
@@ -7,14 +7,20 @@
|
|
7
7
|
}
|
8
8
|
</script>
|
9
9
|
|
10
|
-
<
|
11
|
-
<
|
10
|
+
<span class="svelte-component-wrapper">
|
11
|
+
<h1>Svelte is here!</h1>
|
12
12
|
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<hr/>
|
14
|
+
<p>click the button and check if the component is alive</p>
|
15
|
+
<button on:click={increment}>Increment: {count}</button>
|
16
|
+
|
17
|
+
<hr/>
|
18
|
+
<ul>
|
19
|
+
{#each items as item}
|
20
|
+
<li>{item}</li>
|
21
|
+
{/each}
|
22
|
+
</ul>
|
23
|
+
</span>
|
18
24
|
|
19
25
|
<style>
|
20
26
|
button {
|
@@ -24,4 +30,15 @@
|
|
24
30
|
border: none;
|
25
31
|
cursor: pointer;
|
26
32
|
}
|
33
|
+
|
34
|
+
.svelte-component-wrapper {
|
35
|
+
border: 1px solid black;
|
36
|
+
padding: 10px;
|
37
|
+
margin: 10px;
|
38
|
+
background-color: #efefef;
|
39
|
+
display: inline-block;
|
40
|
+
box-shadow: 2px 3px 16px -1px rgba(0, 0, 0, 0.75);
|
41
|
+
-webkit-box-shadow: 2px 3px 16px -1px rgba(0, 0, 0, 0.75);
|
42
|
+
-moz-box-shadow: 2px 3px 16px -1px rgba(0, 0, 0, 0.75);
|
43
|
+
}
|
27
44
|
</style>
|
data/lib/svelte_on_rails/installer/rails_template/app/views/svelte_on_rails_hello_world/index.haml
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
%
|
1
|
+
%p Example view
|
2
2
|
|
3
|
-
= svelte_component "SvelteOnRailsHelloWorld", items: ['
|
3
|
+
= svelte_component "SvelteOnRailsHelloWorld", items: ['attributes', 'are', 'parsed']
|
@@ -17,7 +17,6 @@ namespace :svelte_on_rails do
|
|
17
17
|
puts '-' * 80
|
18
18
|
puts 'STARTING SVELTE-ON-RAILS INSTALLATION'
|
19
19
|
|
20
|
-
|
21
20
|
# vite
|
22
21
|
|
23
22
|
vite_i = SvelteOnRails::Installer::Vite
|
@@ -45,7 +44,7 @@ namespace :svelte_on_rails do
|
|
45
44
|
tr_pkg = '@hotwired/turbo-rails'
|
46
45
|
|
47
46
|
npm_i.install_or_update_package(tr_pkg)
|
48
|
-
|
47
|
+
|
49
48
|
js_i = SvelteOnRails::Installer::Javascript
|
50
49
|
js_i.append_import_statement(application_js_path, tr_pkg, "import '#{tr_pkg}';")
|
51
50
|
|
@@ -91,8 +90,8 @@ namespace :svelte_on_rails do
|
|
91
90
|
desc "Removes the Hello World component"
|
92
91
|
task :remove_hello_world do
|
93
92
|
|
94
|
-
|
95
|
-
|
93
|
+
hw_i = SvelteOnRails::Installer::HelloWorld
|
94
|
+
hw_i.remove_hello_world
|
96
95
|
|
97
96
|
end
|
98
97
|
|
@@ -100,11 +99,9 @@ namespace :svelte_on_rails do
|
|
100
99
|
task :add_hello_world do
|
101
100
|
|
102
101
|
puts '-' * 80
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
puts "You can now see the Hello World component on: #{hello_world_path}."
|
107
|
-
end
|
102
|
+
hw_i = SvelteOnRails::Installer::HelloWorld
|
103
|
+
hello_world_path = hw_i.install_hello_world
|
104
|
+
puts "You can now see the Hello World component on: #{hello_world_path}."
|
108
105
|
|
109
106
|
end
|
110
107
|
|