kaze 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -2
- data/lib/kaze/commands/install_command.rb +2 -2
- data/lib/kaze/version.rb +1 -1
- data/stubs/hotwire/app/components/modal_component.rb +6 -6
- 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: c2c180c5d3390cc6b2013e98ce172091691001be25971dfc2f2f28fe7022eaf1
|
4
|
+
data.tar.gz: ddc60156cf90ab2827ea0907e0f7d68e6bc4c760963ad271809b80132b0a7884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a47cce2a4bd167ac9f57ac2c367794f61f7354e3400619112abd2482d59a1341ccbe1bbd6881f61104404f4b7a87c59600fe1889abbd5577ab8f12d22308ef6
|
7
|
+
data.tar.gz: 0f885b972c32e66757b2412481b8cce0aacc03fd7512bebbc41e007bc4e715afec41afc36c946fe05e462a5c26256cfbe47955ce61e66508df9467be82ddab77
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Heavily inspired by [Laravel Breeze](https://github.com/laravel/breeze), this ge
|
|
4
4
|
|
5
5
|
[Kaze](https://github.com/gtkvn/kaze) is a minimal, simple implementation of all of Rails's authentication features, including login, registration, password reset. In addition, Kaze includes a simple "profile" page where the user may update their name, email address, and password.
|
6
6
|
|
7
|
-
Kaze provides scaffolding options based on Inertia, with the choice of using Vue or React for the Inertia-based scaffolding.
|
7
|
+
Kaze provides scaffolding options based on [Hotwire](https://hotwired.dev) or [Inertia](https://inertiajs.com), with the choice of using Vue or React for the Inertia-based scaffolding.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -18,11 +18,30 @@ gem install kaze
|
|
18
18
|
|
19
19
|
Once Kaze is installed, you may scaffold your application using one of the Kaze "stacks" discussed in the documentation below.
|
20
20
|
|
21
|
+
## Kaze & Hotwire
|
22
|
+
|
23
|
+
The default Kaze "stack" is the Hotwire stack. Hotwire is a powerful way to building dynamic, reactive, front-end UIs primarily using Ruby and ERB templates without using much JavaScript by sending HTML instead of JSON over the wire.
|
24
|
+
|
25
|
+
The Hotwire stack may be installed by invoking the `install` command with no other additional arguments inside your app directory.
|
26
|
+
|
27
|
+
```
|
28
|
+
kaze install
|
29
|
+
```
|
30
|
+
|
31
|
+
After Kaze's scaffolding is installed, you may start your application:
|
32
|
+
|
33
|
+
```
|
34
|
+
bin/setup
|
35
|
+
bin/dev
|
36
|
+
```
|
37
|
+
|
38
|
+
Next, you may navigate to your application's `/login` or `/register` URLs in your web browser.
|
39
|
+
|
21
40
|
## Kaze & React / Vue
|
22
41
|
|
23
42
|
Kaze offers React and Vue scaffolding via an Inertia frontend implementation. Inertia allows you to build modern, single-page React and Vue applications using classic server-side routing and controllers.
|
24
43
|
|
25
|
-
Inertia lets you enjoy the frontend power of React and Vue combined with the incredible backend productivity of Rails and lightning-fast Vite compilation. To use an Inertia stack, specify
|
44
|
+
Inertia lets you enjoy the frontend power of React and Vue combined with the incredible backend productivity of Rails and lightning-fast Vite compilation. To use an Inertia stack, specify `react` or `vue` as your desired stack when executing the `install` command inside your app directory:
|
26
45
|
|
27
46
|
```
|
28
47
|
kaze install react
|
@@ -7,7 +7,7 @@ class Kaze::Commands::InstallCommand < Thor
|
|
7
7
|
include Kaze::Commands::InstallsHotwireStack
|
8
8
|
include Kaze::Commands::InstallsInertiaStacks
|
9
9
|
|
10
|
-
desc "install [STACK]", "Install the Kaze controllers and resources. Supported stacks: react, vue."
|
10
|
+
desc "install [STACK]", "Install the Kaze controllers and resources. Supported stacks: hotwire, react, vue."
|
11
11
|
def install(stack = "hotwire")
|
12
12
|
if stack == "hotwire"
|
13
13
|
return install_hotwire_stack
|
@@ -21,7 +21,7 @@ class Kaze::Commands::InstallCommand < Thor
|
|
21
21
|
return install_inertia_vue_stack
|
22
22
|
end
|
23
23
|
|
24
|
-
say "Invalid stack. Supported stacks are [react], [vue].", :red
|
24
|
+
say "Invalid stack. Supported stacks are [hotwire], [react], [vue].", :red
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
data/lib/kaze/version.rb
CHANGED
@@ -3,12 +3,12 @@ class ModalComponent < ViewComponent::Base
|
|
3
3
|
@name = attributes[:name]
|
4
4
|
@show = attributes[:show] || false
|
5
5
|
@max_width = {
|
6
|
-
:sm =>
|
7
|
-
:md =>
|
8
|
-
:lg =>
|
9
|
-
:xl =>
|
10
|
-
|
11
|
-
}[attributes[:max_width] ||
|
6
|
+
:sm => "sm:max-w-sm",
|
7
|
+
:md => "sm:max-w-md",
|
8
|
+
:lg => "sm:max-w-lg",
|
9
|
+
:xl => "sm:max-w-xl",
|
10
|
+
"2xl" => "sm:max-w-2xl"
|
11
|
+
}[attributes[:max_width] || "2xl"]
|
12
12
|
@attributes = attributes.without(:name, :show, :max_width)
|
13
13
|
end
|
14
14
|
end
|