next_rails_scaffold 0.1.10 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6410f332a9e5aa501713996115198221e8096c8fa7cf6d09754bdeba30b99c31
4
- data.tar.gz: 9a6f90d15a0f292b6106325fc49537eabc3890380e5c8f14537747d669cc816f
3
+ metadata.gz: f62c69ac348b5a9eb16f7bf25be74b6ceb753d0a7fdcb023c0e20fa03ae05fec
4
+ data.tar.gz: 9f0fe1e479a70c791e20ddba38db1396c90329b64d9b0bbb942078bf1d063306
5
5
  SHA512:
6
- metadata.gz: c40dfa2dc06a5845ece1b8250dac1c77bda54b3363f3d9e00f4c5bd1e2fdfd2e93c90b0d567cc73b939b80c0ccbc8b483cb71c25879b1678e0ca08e89be7e69e
7
- data.tar.gz: daa16be2230197dd500e79bb4df7dbc34dc3d80c58a3e24fac15cbf33bd08efbcb22f917b50d2744d46ee4b608ddd4a1c8b63ba503a80da3cd03a553dac1e7db
6
+ metadata.gz: b174d2f71fcc7d0c25013c222b8f5127252a399da45d2f3d59b7c27323b11e724049ac0f5789bf8b9302fca3fddd9083216661cb04407c170ebd8503a6e67908
7
+ data.tar.gz: fd369e1888cefdb74e5246bff429ffc87843130268aa951530fc2bd8dc91bbc125134c20b282a9e1cfa17d81dba340cd928315c24542cbc307bba6f0be4c9f1e
data/README.md CHANGED
@@ -15,6 +15,14 @@ Currently, https://www.hygen.io/ is used to create Next.js code, and the https:/
15
15
  </a>
16
16
  </div>
17
17
 
18
+ ## Why?
19
+
20
+ In one of my posts on [Medium](https://medium.com/@raphox/rails-and-next-js-the-perfect-combination-for-modern-web-development-part-2-308d2f41a767) I go into more detail about the reasons why I created this project. But to summarize, I'll list a few relevant points:
21
+
22
+ 1. When I compare the alternatives offered by [Hotwire](https://hotwired.dev/) with the entire React ecosystem, for me Hotwire is stuck in the way of developing web applications that were practiced more than ten years ago when there were no frameworks like React;
23
+ 2. The maturity and ease of the Ruby language and the Ruby on Rails framework justify having more than one language in the same project;
24
+ 3. Nothing prevents me from keeping the static site or Single-Page Application (SPA) for smaller projects and, if there's a need or demand, later maintaining my API and configuring my Next application to run on a Node server and offer SSR;
25
+
18
26
  ## Key Features:
19
27
 
20
28
  - **Automatic Frontend Setup:** The gem automates the creation of a frontend directory within the Rails project, ready for Next.js development.
@@ -41,6 +49,10 @@ The `next_rails_scaffold` gem enhances the default Ruby on Rails scaffold genera
41
49
  Example:
42
50
 
43
51
  ```
52
+ # Appending the `next_rails_scaffold` generator steps to the to the Rails' scaffold generator.
53
+ bin/rails generate next_rails_scaffold:install
54
+
55
+ # Generate the RESfull API endpoints and Next.js app with respective components and pages.
44
56
  bin/rails generate scaffold Post tile:string body:text
45
57
  ```
46
58
 
@@ -50,7 +50,7 @@ module Rails
50
50
  create_next_app!
51
51
  install_hygen!
52
52
 
53
- run("npx hygen generator scaffold #{name} #{mapped_attributes.join(" ")}")
53
+ run("npx hygen scaffold javascript #{name} #{mapped_attributes.join(" ")}")
54
54
  run("yarn build")
55
55
  end
56
56
  end
@@ -3,6 +3,5 @@
3
3
  module NextRailsScaffold
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace NextRailsScaffold
6
- config.eager_load_namespaces << NextRailsScaffold
7
6
  end
8
7
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NextRailsScaffold
4
- VERSION = "0.1.10"
4
+ VERSION = "0.1.12"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: next_rails_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Araújo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-25 00:00:00.000000000 Z
11
+ date: 2023-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails